diff options
author | Paul Holzinger <pholzing@redhat.com> | 2022-06-03 15:01:23 +0200 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2022-06-14 16:12:10 -0400 |
commit | 2ee28e30d61769de5137ce5c46b5f16778cf3756 (patch) | |
tree | 629b649c8c6178e9a66ca9091a00ce85bdfe7ec2 /libpod | |
parent | bb11e24e6d870354f089fac9555679a23ee65a0b (diff) | |
download | podman-2ee28e30d61769de5137ce5c46b5f16778cf3756.tar.gz podman-2ee28e30d61769de5137ce5c46b5f16778cf3756.tar.bz2 podman-2ee28e30d61769de5137ce5c46b5f16778cf3756.zip |
podman logs k8s-file: do not reassemble partial log lines
The backend should not convert partial lines to full log lines. While
this works for most cases it cannot work when the last line is partial
since it will just be lost. The frontend logic can already display
partial lines correctly. The journald driver also works correctly since
it does not such conversion.
Fixes #14458
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_log.go | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/libpod/container_log.go b/libpod/container_log.go index 7a9eb2dbf..da6d51670 100644 --- a/libpod/container_log.go +++ b/libpod/container_log.go @@ -75,7 +75,6 @@ func (c *Container) readFromLogFile(ctx context.Context, options *logs.LogOption go func() { defer options.WaitGroup.Done() - var partial string for line := range t.Lines { select { case <-ctx.Done(): @@ -89,13 +88,6 @@ func (c *Container) readFromLogFile(ctx context.Context, options *logs.LogOption logrus.Errorf("Getting new log line: %v", err) continue } - if nll.Partial() { - partial += nll.Msg - continue - } else if !nll.Partial() && len(partial) > 0 { - nll.Msg = partial + nll.Msg - partial = "" - } nll.CID = c.ID() nll.CName = c.Name() nll.ColorID = colorID |