Skip to content

Commit 84f2168

Browse files
jan4843ndeloof
authored andcommitted
Fix extra space printed with --no-log-prefix option
Signed-off-by: Jan Vitturi <[email protected]>
1 parent a603e27 commit 84f2168

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/formatter/logs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (l *logConsumer) Log(container, service, message string) {
7979
}
8080
p := l.getPresenter(container)
8181
for _, line := range strings.Split(message, "\n") {
82-
fmt.Fprintf(l.writer, "%s %s\n", p.prefix, line) // nolint:errcheck
82+
fmt.Fprintf(l.writer, "%s%s\n", p.prefix, line) // nolint:errcheck
8383
}
8484
}
8585

@@ -118,5 +118,5 @@ type presenter struct {
118118
}
119119

120120
func (p *presenter) setPrefix(width int) {
121-
p.prefix = p.colors(fmt.Sprintf("%-"+strconv.Itoa(width)+"s |", p.name))
121+
p.prefix = p.colors(fmt.Sprintf("%-"+strconv.Itoa(width)+"s | ", p.name))
122122
}

0 commit comments

Comments
 (0)