mirror of
https://github.com/docker/compose.git
synced 2025-07-30 09:04:12 +02:00
Add a space character to separate the timestamp from the log message
Signed-off-by: Cedric Staniewski <cedric@gmx.ca>
This commit is contained in:
parent
cb95910018
commit
5a704004d3
@ -122,7 +122,7 @@ func (l *logConsumer) write(w io.Writer, container, message string) {
|
|||||||
timestamp := time.Now().Format(jsonmessage.RFC3339NanoFixed)
|
timestamp := time.Now().Format(jsonmessage.RFC3339NanoFixed)
|
||||||
for _, line := range strings.Split(message, "\n") {
|
for _, line := range strings.Split(message, "\n") {
|
||||||
if l.timestamp {
|
if l.timestamp {
|
||||||
_, _ = fmt.Fprintf(w, "%s%s%s\n", p.prefix, timestamp, line)
|
_, _ = fmt.Fprintf(w, "%s%s %s\n", p.prefix, timestamp, line)
|
||||||
} else {
|
} else {
|
||||||
_, _ = fmt.Fprintf(w, "%s%s\n", p.prefix, line)
|
_, _ = fmt.Fprintf(w, "%s%s\n", p.prefix, line)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user