Skip to content

Commit

Permalink
common/loggers: Re-add trailing newline in logger.Printf
Browse files Browse the repository at this point in the history
Fixes #11130
  • Loading branch information
bep committed Jun 18, 2023
1 parent 8a04d47 commit 1b85303
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions common/loggers/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@ func (l *logAdapter) PrintTimerIfDelayed(start time.Time, name string) {
}

func (l *logAdapter) Printf(format string, v ...any) {
// Add trailing newline if not present.
if !strings.HasSuffix(format, "\n") {
format += "\n"
}
fmt.Fprintf(l.out, format, v...)
}

Expand Down

0 comments on commit 1b85303

Please sign in to comment.