summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-09-14 11:27:12 +0200
committerPaul Holzinger <pholzing@redhat.com>2021-09-14 11:40:13 +0200
commit31604b43d13c93bc730b07227ed0c39a7b3314cd (patch)
treeeb992bd5ac686abac4fc442c8b5640e72c1a8532 /pkg
parentcc9491447479844ffdd27ba1c310d7e0a5a59a79 (diff)
downloadpodman-31604b43d13c93bc730b07227ed0c39a7b3314cd.tar.gz
podman-31604b43d13c93bc730b07227ed0c39a7b3314cd.tar.bz2
podman-31604b43d13c93bc730b07227ed0c39a7b3314cd.zip
Revert "logs: adjust handling around partial log messages"
This reverts commit 21f396de6f5024abbf6edd2ca63edcb1525eefcc. Changing the log endpoint is a breaking change we should not do in 3.4. [NO TESTS NEEDED] Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/compat/containers_logs.go4
-rw-r--r--pkg/domain/infra/tunnel/containers.go4
2 files changed, 5 insertions, 3 deletions
diff --git a/pkg/api/handlers/compat/containers_logs.go b/pkg/api/handlers/compat/containers_logs.go
index 4adcaa511..d73b02b47 100644
--- a/pkg/api/handlers/compat/containers_logs.go
+++ b/pkg/api/handlers/compat/containers_logs.go
@@ -153,7 +153,9 @@ func LogsFromContainer(w http.ResponseWriter, r *http.Request) {
}
frame.WriteString(line.Msg)
- if !line.Partial() {
+ // Log lines in the compat layer require adding EOL
+ // https://github.com/containers/podman/issues/8058
+ if !utils.IsLibpodRequest(r) {
frame.WriteString("\n")
}
diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go
index 81ddce42f..b638bfe24 100644
--- a/pkg/domain/infra/tunnel/containers.go
+++ b/pkg/domain/infra/tunnel/containers.go
@@ -404,11 +404,11 @@ func (ic *ContainerEngine) ContainerLogs(_ context.Context, nameOrIDs []string,
return err
case line := <-stdoutCh:
if opts.StdoutWriter != nil {
- _, _ = io.WriteString(opts.StdoutWriter, line)
+ _, _ = io.WriteString(opts.StdoutWriter, line+"\n")
}
case line := <-stderrCh:
if opts.StderrWriter != nil {
- _, _ = io.WriteString(opts.StderrWriter, line)
+ _, _ = io.WriteString(opts.StderrWriter, line+"\n")
}
}
}