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:
Cedric Staniewski 2025-07-11 22:53:31 +02:00 committed by Guillaume Lours
parent cb95910018
commit 5a704004d3

View File

@ -122,7 +122,7 @@ func (l *logConsumer) write(w io.Writer, container, message string) {
timestamp := time.Now().Format(jsonmessage.RFC3339NanoFixed)
for _, line := range strings.Split(message, "\n") {
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 {
_, _ = fmt.Fprintf(w, "%s%s\n", p.prefix, line)
}