aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-08-24 14:16:22 -0400
committerGitHub <noreply@github.com>2021-08-24 14:16:22 -0400
commit23f9565547ae2a6b0154e6913abf7f1232f0ece0 (patch)
tree4c82eb688848627c86dcfa1240753a0a271cc636 /pkg
parent24ee67bb09ffd6cf970fd0041757cd98e065e848 (diff)
parent3007bd4a9939c0ed8160a319f70788c19e419435 (diff)
downloadpodman-23f9565547ae2a6b0154e6913abf7f1232f0ece0.tar.gz
podman-23f9565547ae2a6b0154e6913abf7f1232f0ece0.tar.bz2
podman-23f9565547ae2a6b0154e6913abf7f1232f0ece0.zip
Merge pull request #11263 from nalind/journal-read
libpod/Container.readFromJournal(): don't skip the first entry
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, 3 insertions, 5 deletions
diff --git a/pkg/api/handlers/compat/containers_logs.go b/pkg/api/handlers/compat/containers_logs.go
index 656e2c627..0c10ce75e 100644
--- a/pkg/api/handlers/compat/containers_logs.go
+++ b/pkg/api/handlers/compat/containers_logs.go
@@ -152,9 +152,7 @@ func LogsFromContainer(w http.ResponseWriter, r *http.Request) {
}
frame.WriteString(line.Msg)
- // Log lines in the compat layer require adding EOL
- // https://github.com/containers/podman/issues/8058
- if !utils.IsLibpodRequest(r) {
+ if !line.Partial() {
frame.WriteString("\n")
}
diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go
index b638bfe24..81ddce42f 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+"\n")
+ _, _ = io.WriteString(opts.StdoutWriter, line)
}
case line := <-stderrCh:
if opts.StderrWriter != nil {
- _, _ = io.WriteString(opts.StderrWriter, line+"\n")
+ _, _ = io.WriteString(opts.StderrWriter, line)
}
}
}