summaryrefslogtreecommitdiff
path: root/cmd/podman/logs.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-10-31 15:39:06 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-10-31 19:55:36 +0100
commit11750df51015a675c1145982847e08397c7606ea (patch)
tree4780e20130f24bff8cc6e6a4434d4e79628fee31 /cmd/podman/logs.go
parentffe36ea9964242235571ad1d21a0c4d825ef5971 (diff)
downloadpodman-11750df51015a675c1145982847e08397c7606ea.tar.gz
podman-11750df51015a675c1145982847e08397c7606ea.tar.bz2
podman-11750df51015a675c1145982847e08397c7606ea.zip
logs: support --tail 0
change the default to -1, so that we can change the semantic of "--tail 0" to not print any existing log line. Closes: https://github.com/containers/libpod/issues/4396 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'cmd/podman/logs.go')
-rw-r--r--cmd/podman/logs.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/logs.go b/cmd/podman/logs.go
index 32605389e..a2594b5bf 100644
--- a/cmd/podman/logs.go
+++ b/cmd/podman/logs.go
@@ -52,7 +52,7 @@ func init() {
flags.BoolVarP(&logsCommand.Follow, "follow", "f", false, "Follow log output. The default is false")
flags.BoolVarP(&logsCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
flags.StringVar(&logsCommand.Since, "since", "", "Show logs since TIMESTAMP")
- flags.Uint64Var(&logsCommand.Tail, "tail", 0, "Output the specified number of LINES at the end of the logs. Defaults to 0, which prints all lines")
+ flags.Int64Var(&logsCommand.Tail, "tail", -1, "Output the specified number of LINES at the end of the logs. Defaults to -1, which prints all lines")
flags.BoolVarP(&logsCommand.Timestamps, "timestamps", "t", false, "Output the timestamps in the log")
markFlagHidden(flags, "details")
flags.SetInterspersed(false)