aboutsummaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-03-01 08:43:50 -0500
committerGitHub <noreply@github.com>2022-03-01 08:43:50 -0500
commit8bdda91ab738d634528259581c8adebe1db007b4 (patch)
tree59af32859f166fb3ae84bbbe1b46126e3c950577 /libpod
parent87d22e101465fa9e8d25653918328e768a92aa71 (diff)
parent40c6192e9e3da7f2f3f54365c89b4b837ed74fd8 (diff)
downloadpodman-8bdda91ab738d634528259581c8adebe1db007b4.tar.gz
podman-8bdda91ab738d634528259581c8adebe1db007b4.tar.bz2
podman-8bdda91ab738d634528259581c8adebe1db007b4.zip
Merge pull request #13362 from keonchennl/pod-logs-add-flag
Add the names flag for pod logs
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_log_linux.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/libpod/container_log_linux.go b/libpod/container_log_linux.go
index 6150973ca..8ae8ff2c0 100644
--- a/libpod/container_log_linux.go
+++ b/libpod/container_log_linux.go
@@ -1,5 +1,5 @@
-//+build linux
-//+build systemd
+//go:build linux && systemd
+// +build linux,systemd
package libpod
@@ -235,6 +235,9 @@ func (c *Container) readFromJournal(ctx context.Context, options *logs.LogOption
logrus.Errorf("Failed parse log line: %v", err)
return
}
+ if options.UseName {
+ logLine.CName = c.Name()
+ }
if doTail {
tailQueue = append(tailQueue, logLine)
continue