Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove trailing newlines from log messages #1282

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions consumergroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ func (g *Generation) heartbeatLoop(interval time.Duration) {
l.Printf("started heartbeat for group, %v [%v]", g.GroupID, interval)
})
defer g.log(func(l Logger) {
l.Printf("stopped heartbeat for group %s\n", g.GroupID)
l.Printf("stopped heartbeat for group %s", g.GroupID)
})

ticker := time.NewTicker(interval)
Expand Down Expand Up @@ -1009,7 +1009,7 @@ func (cg *ConsumerGroup) makeJoinGroupRequestV1(memberID string) (joinGroupReque
// their various partitions.
func (cg *ConsumerGroup) assignTopicPartitions(conn coordinator, group joinGroupResponseV1) (GroupMemberAssignments, error) {
cg.withLogger(func(l Logger) {
l.Printf("selected as leader for group, %s\n", cg.config.ID)
l.Printf("selected as leader for group, %s", cg.config.ID)
})

balancer, ok := findGroupBalancer(group.GroupProtocol, cg.config.GroupBalancers)
Expand Down
6 changes: 3 additions & 3 deletions reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,10 @@ func (r *Reader) commitLoopInterval(ctx context.Context, gen *Generation) {
// commitLoop processes commits off the commit chan.
func (r *Reader) commitLoop(ctx context.Context, gen *Generation) {
r.withLogger(func(l Logger) {
l.Printf("started commit for group %s\n", r.config.GroupID)
l.Printf("started commit for group %s", r.config.GroupID)
})
defer r.withLogger(func(l Logger) {
l.Printf("stopped commit for group %s\n", r.config.GroupID)
l.Printf("stopped commit for group %s", r.config.GroupID)
})

if r.useSyncCommits() {
Expand All @@ -293,7 +293,7 @@ func (r *Reader) run(cg *ConsumerGroup) {
defer cg.Close()

r.withLogger(func(l Logger) {
l.Printf("entering loop for consumer group, %v\n", r.config.GroupID)
l.Printf("entering loop for consumer group, %v", r.config.GroupID)
})

for {
Expand Down