diff options
author | Paul Holzinger <pholzing@redhat.com> | 2021-09-14 11:27:12 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2021-09-14 11:40:13 +0200 |
commit | 31604b43d13c93bc730b07227ed0c39a7b3314cd (patch) | |
tree | eb992bd5ac686abac4fc442c8b5640e72c1a8532 /libpod | |
parent | cc9491447479844ffdd27ba1c310d7e0a5a59a79 (diff) | |
download | podman-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 'libpod')
-rw-r--r-- | libpod/logs/log.go | 12 | ||||
-rw-r--r-- | libpod/oci_conmon_linux.go | 8 |
2 files changed, 5 insertions, 15 deletions
diff --git a/libpod/logs/log.go b/libpod/logs/log.go index a584de0ee..1a0223edc 100644 --- a/libpod/logs/log.go +++ b/libpod/logs/log.go @@ -251,19 +251,11 @@ func (l *LogLine) Write(stdout io.Writer, stderr io.Writer, logOpts *LogOptions) switch l.Device { case "stdout": if stdout != nil { - if l.Partial() { - fmt.Fprint(stdout, l.String(logOpts)) - } else { - fmt.Fprintln(stdout, l.String(logOpts)) - } + fmt.Fprintln(stdout, l.String(logOpts)) } case "stderr": if stderr != nil { - if l.Partial() { - fmt.Fprint(stderr, l.String(logOpts)) - } else { - fmt.Fprintln(stderr, l.String(logOpts)) - } + fmt.Fprintln(stderr, l.String(logOpts)) } default: // Warn the user if the device type does not match. Most likely the file is corrupted. diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go index c00d83f95..924df2310 100644 --- a/libpod/oci_conmon_linux.go +++ b/libpod/oci_conmon_linux.go @@ -624,11 +624,9 @@ func (r *ConmonOCIRuntime) HTTPAttach(ctr *Container, req *http.Request, w http. if err != nil { break } - if !logLine.Partial() { - _, err = httpBuf.Write([]byte("\n")) - if err != nil { - break - } + _, err = httpBuf.Write([]byte("\n")) + if err != nil { + break } err = httpBuf.Flush() if err != nil { |