summaryrefslogtreecommitdiff
path: root/libpod/container_log_linux.go
diff options
context:
space:
mode:
authorAshley Cui <acui@redhat.com>2021-02-15 15:36:33 -0500
committerAshley Cui <acui@redhat.com>2021-02-19 02:21:12 -0500
commitfbc50e5285e960e6533e64a768dd4fb5615c8f7e (patch)
treeb9612404963221173de3552df0b867980983894c /libpod/container_log_linux.go
parent1c6c94d44a207e42eddf9b863c20e5004021f3af (diff)
downloadpodman-fbc50e5285e960e6533e64a768dd4fb5615c8f7e.tar.gz
podman-fbc50e5285e960e6533e64a768dd4fb5615c8f7e.tar.bz2
podman-fbc50e5285e960e6533e64a768dd4fb5615c8f7e.zip
fix journald logs --tail 0
Signed-off-by: Ashley Cui <acui@redhat.com>
Diffstat (limited to 'libpod/container_log_linux.go')
-rw-r--r--libpod/container_log_linux.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/container_log_linux.go b/libpod/container_log_linux.go
index d895171cf..c9620100e 100644
--- a/libpod/container_log_linux.go
+++ b/libpod/container_log_linux.go
@@ -34,6 +34,8 @@ func (c *Container) readFromJournal(ctx context.Context, options *logs.LogOption
var config journal.JournalReaderConfig
if options.Tail < 0 {
config.NumFromTail = 0
+ } else if options.Tail == 0 {
+ config.NumFromTail = math.MaxUint64
} else {
config.NumFromTail = uint64(options.Tail)
}