diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-08-24 14:16:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-24 14:16:22 -0400 |
commit | 23f9565547ae2a6b0154e6913abf7f1232f0ece0 (patch) | |
tree | 4c82eb688848627c86dcfa1240753a0a271cc636 /libpod/logs/log.go | |
parent | 24ee67bb09ffd6cf970fd0041757cd98e065e848 (diff) | |
parent | 3007bd4a9939c0ed8160a319f70788c19e419435 (diff) | |
download | podman-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 'libpod/logs/log.go')
-rw-r--r-- | libpod/logs/log.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libpod/logs/log.go b/libpod/logs/log.go index 1a0223edc..a584de0ee 100644 --- a/libpod/logs/log.go +++ b/libpod/logs/log.go @@ -251,11 +251,19 @@ func (l *LogLine) Write(stdout io.Writer, stderr io.Writer, logOpts *LogOptions) switch l.Device { case "stdout": if stdout != nil { - fmt.Fprintln(stdout, l.String(logOpts)) + if l.Partial() { + fmt.Fprint(stdout, l.String(logOpts)) + } else { + fmt.Fprintln(stdout, l.String(logOpts)) + } } case "stderr": if stderr != nil { - fmt.Fprintln(stderr, l.String(logOpts)) + if l.Partial() { + fmt.Fprint(stderr, l.String(logOpts)) + } else { + fmt.Fprintln(stderr, l.String(logOpts)) + } } default: // Warn the user if the device type does not match. Most likely the file is corrupted. |