From 40c6192e9e3da7f2f3f54365c89b4b837ed74fd8 Mon Sep 17 00:00:00 2001 From: Xueyuan Chen Date: Sat, 26 Feb 2022 23:07:25 +0100 Subject: Add the names flag for pod logs Fixes containers#13261 Signed-off-by: Xueyuan Chen --- cmd/podman/pods/logs.go | 1 + 1 file changed, 1 insertion(+) (limited to 'cmd/podman') diff --git a/cmd/podman/pods/logs.go b/cmd/podman/pods/logs.go index 1b00f047e..e35b48bed 100644 --- a/cmd/podman/pods/logs.go +++ b/cmd/podman/pods/logs.go @@ -87,6 +87,7 @@ func logsFlags(cmd *cobra.Command) { flags.Int64Var(&logsPodOptions.Tail, tailFlagName, -1, "Output the specified number of LINES at the end of the logs.") _ = cmd.RegisterFlagCompletionFunc(tailFlagName, completion.AutocompleteNone) + flags.BoolVarP(&logsPodOptions.Names, "names", "n", false, "Output container names instead of container IDs in the log") flags.BoolVarP(&logsPodOptions.Timestamps, "timestamps", "t", false, "Output the timestamps in the log") flags.SetInterspersed(false) _ = flags.MarkHidden("details") -- cgit v1.2.3-54-g00ecf