diff options
author | Alexander Zigelski <7140800+crunchtime-ali@users.noreply.github.com> | 2020-10-20 22:02:01 +0200 |
---|---|---|
committer | Alexander Zigelski <ali@crunchtime.dev> | 2020-10-21 16:21:28 +0200 |
commit | b26c6519ac366fc8696f1d1dadac8d12fc256de2 (patch) | |
tree | c7b1b96efa93765e830172bfd7e170ca74f56ac6 /pkg/api/handlers/compat | |
parent | 4822cc8cabce33732cb210103aaa208f81102c5d (diff) | |
download | podman-b26c6519ac366fc8696f1d1dadac8d12fc256de2.tar.gz podman-b26c6519ac366fc8696f1d1dadac8d12fc256de2.tar.bz2 podman-b26c6519ac366fc8696f1d1dadac8d12fc256de2.zip |
Add EOL to compat container logs
Signed-off-by: Alexander Zigelski <ali@crunchtime.dev>
Diffstat (limited to 'pkg/api/handlers/compat')
-rw-r--r-- | pkg/api/handlers/compat/containers_logs.go | 6 |
1 files changed, 6 insertions, 0 deletions
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())) |