summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libpod/container_log_linux.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/libpod/container_log_linux.go b/libpod/container_log_linux.go
index 4029d0af7..b6b780bab 100644
--- a/libpod/container_log_linux.go
+++ b/libpod/container_log_linux.go
@@ -140,6 +140,7 @@ func (c *Container) readFromJournal(ctx context.Context, options *logs.LogOption
doTail = false
}
lastReadCursor := ""
+ partial := ""
for {
select {
case <-ctx.Done():
@@ -229,6 +230,12 @@ func (c *Container) readFromJournal(ctx context.Context, options *logs.LogOption
logrus.Errorf("Failed parse log line: %v", err)
return
}
+ if logLine.Partial() {
+ partial += logLine.Msg
+ continue
+ }
+ logLine.Msg = partial + logLine.Msg
+ partial = ""
if doTail {
tailQueue = append(tailQueue, logLine)
continue