diff options
author | Ashley Cui <acui@redhat.com> | 2021-02-15 15:36:33 -0500 |
---|---|---|
committer | Ashley Cui <acui@redhat.com> | 2021-02-19 02:21:12 -0500 |
commit | fbc50e5285e960e6533e64a768dd4fb5615c8f7e (patch) | |
tree | b9612404963221173de3552df0b867980983894c | |
parent | 1c6c94d44a207e42eddf9b863c20e5004021f3af (diff) | |
download | podman-fbc50e5285e960e6533e64a768dd4fb5615c8f7e.tar.gz podman-fbc50e5285e960e6533e64a768dd4fb5615c8f7e.tar.bz2 podman-fbc50e5285e960e6533e64a768dd4fb5615c8f7e.zip |
fix journald logs --tail 0
Signed-off-by: Ashley Cui <acui@redhat.com>
-rw-r--r-- | libpod/container_log_linux.go | 2 |
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) } |