mirror of
https://github.com/docker/compose.git
synced 2025-07-30 09:04:12 +02:00
Fix extra space printed with --no-log-prefix
option
Signed-off-by: Jan Vitturi <vitturi.jan@gmail.com>
This commit is contained in:
parent
a603e27117
commit
84f2168f80
@ -79,7 +79,7 @@ func (l *logConsumer) Log(container, service, message string) {
|
|||||||
}
|
}
|
||||||
p := l.getPresenter(container)
|
p := l.getPresenter(container)
|
||||||
for _, line := range strings.Split(message, "\n") {
|
for _, line := range strings.Split(message, "\n") {
|
||||||
fmt.Fprintf(l.writer, "%s %s\n", p.prefix, line) // nolint:errcheck
|
fmt.Fprintf(l.writer, "%s%s\n", p.prefix, line) // nolint:errcheck
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,5 +118,5 @@ type presenter struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *presenter) setPrefix(width int) {
|
func (p *presenter) setPrefix(width int) {
|
||||||
p.prefix = p.colors(fmt.Sprintf("%-"+strconv.Itoa(width)+"s |", p.name))
|
p.prefix = p.colors(fmt.Sprintf("%-"+strconv.Itoa(width)+"s | ", p.name))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user