summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/compat
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-10-21 15:31:08 -0400
committerGitHub <noreply@github.com>2020-10-21 15:31:08 -0400
commit61b276a05c1c8adc51c6d4f7c061b89ce39a803b (patch)
treef6c4e7c0241cf9b50a5130a37d17457354aa9bd0 /pkg/api/handlers/compat
parenta1b942ff401a9315dae05d9a3210780823d12839 (diff)
parentb26c6519ac366fc8696f1d1dadac8d12fc256de2 (diff)
downloadpodman-61b276a05c1c8adc51c6d4f7c061b89ce39a803b.tar.gz
podman-61b276a05c1c8adc51c6d4f7c061b89ce39a803b.tar.bz2
podman-61b276a05c1c8adc51c6d4f7c061b89ce39a803b.zip
Merge pull request #8083 from crunchtime-ali/add-eol-to-compat-log
Add EOL to compat container logs
Diffstat (limited to 'pkg/api/handlers/compat')
-rw-r--r--pkg/api/handlers/compat/containers_logs.go6
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()))