Skip to content

Commit

Permalink
Merge pull request #8083 from crunchtime-ali/add-eol-to-compat-log
Browse files Browse the repository at this point in the history
Add EOL to compat container logs
  • Loading branch information
openshift-merge-robot authored Oct 21, 2020
2 parents a1b942f + b26c651 commit 61b276a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/api/handlers/compat/containers_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down

0 comments on commit 61b276a

Please sign in to comment.