aboutsummaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2020-12-23 14:04:32 -0600
committerbaude <bbaude@redhat.com>2020-12-23 14:04:32 -0600
commit0301e4d7bcf7c8f318a67588f30c60013519e748 (patch)
tree31162b7fcf3a12c98303f2447f61de6db8975090 /libpod
parent54b82a175f16f27849e6791f65bf73eccae4701a (diff)
downloadpodman-0301e4d7bcf7c8f318a67588f30c60013519e748.tar.gz
podman-0301e4d7bcf7c8f318a67588f30c60013519e748.tar.bz2
podman-0301e4d7bcf7c8f318a67588f30c60013519e748.zip
re-open container log files
when following container log files, if the file gets rotated due to something like size limit, re-open it and keep following. Fixes: #8733 Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/logs/log.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/logs/log.go b/libpod/logs/log.go
index d463c0aa4..2637c8524 100644
--- a/libpod/logs/log.go
+++ b/libpod/logs/log.go
@@ -73,7 +73,7 @@ func GetLogFile(path string, options *LogOptions) (*tail.Tail, []*LogLine, error
Whence: whence,
}
- t, err := tail.TailFile(path, tail.Config{MustExist: true, Poll: true, Follow: options.Follow, Location: &seek, Logger: tail.DiscardingLogger})
+ t, err := tail.TailFile(path, tail.Config{MustExist: true, Poll: true, Follow: options.Follow, Location: &seek, Logger: tail.DiscardingLogger, ReOpen: options.Follow})
return t, logTail, err
}