summaryrefslogtreecommitdiff
path: root/libpod/container_log.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-06-03 15:01:23 +0200
committerPaul Holzinger <pholzing@redhat.com>2022-06-03 15:01:23 +0200
commit2414586662b905e1d3c0cf21f3cc26e628e15bdd (patch)
tree567326269cd2d552d90b13380cd98748d1c0b113 /libpod/container_log.go
parentf7a54088c30dd71a625527aecd740bac8086ccdb (diff)
downloadpodman-2414586662b905e1d3c0cf21f3cc26e628e15bdd.tar.gz
podman-2414586662b905e1d3c0cf21f3cc26e628e15bdd.tar.bz2
podman-2414586662b905e1d3c0cf21f3cc26e628e15bdd.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/container_log.go')
-rw-r--r--libpod/container_log.go8
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