From fbc50e5285e960e6533e64a768dd4fb5615c8f7e Mon Sep 17 00:00:00 2001 From: Ashley Cui Date: Mon, 15 Feb 2021 15:36:33 -0500 Subject: fix journald logs --tail 0 Signed-off-by: Ashley Cui --- libpod/container_log_linux.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libpod') 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) } -- cgit v1.2.3-54-g00ecf