From b26c6519ac366fc8696f1d1dadac8d12fc256de2 Mon Sep 17 00:00:00 2001 From: Alexander Zigelski <7140800+crunchtime-ali@users.noreply.github.com> Date: Tue, 20 Oct 2020 22:02:01 +0200 Subject: Add EOL to compat container logs Signed-off-by: Alexander Zigelski --- pkg/api/handlers/compat/containers_logs.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkg/api') diff --git a/pkg/api/handlers/compat/containers_logs.go b/pkg/api/handlers/compat/containers_logs.go index faab66fe7..38a6329b9 100644 --- a/pkg/api/handlers/compat/containers_logs.go +++ b/pkg/api/handlers/compat/containers_logs.go @@ -148,7 +148,13 @@ func LogsFromContainer(w http.ResponseWriter, r *http.Request) { frame.WriteString(line.Time.Format(time.RFC3339)) frame.WriteString(" ") } + frame.WriteString(line.Msg) + // Log lines in the compat layer require adding EOL + // https://github.com/containers/podman/issues/8058 + if !utils.IsLibpodRequest(r) { + frame.WriteString("\n") + } if writeHeader { binary.BigEndian.PutUint32(header[4:], uint32(frame.Len())) -- cgit v1.2.3-54-g00ecf