summaryrefslogtreecommitdiff
path: root/libpod/container.log.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-02-28 18:55:58 +0100
committerGitHub <noreply@github.com>2020-02-28 18:55:58 +0100
commita58bf77d3eb31b48fd8904b782543e3fe364df66 (patch)
tree4b24e15baceda19e57de1a3345a23b576f4741a5 /libpod/container.log.go
parentc19269639359e24be9a50143faac47b473522c91 (diff)
parent7f411cb325986e88f1b04c2fc2a0e17a9e283ddf (diff)
downloadpodman-a58bf77d3eb31b48fd8904b782543e3fe364df66.tar.gz
podman-a58bf77d3eb31b48fd8904b782543e3fe364df66.tar.bz2
podman-a58bf77d3eb31b48fd8904b782543e3fe364df66.zip
Merge pull request #5244 from Akasurde/i4962
Add cmd flag to show container name in log
Diffstat (limited to 'libpod/container.log.go')
-rw-r--r--libpod/container.log.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/container.log.go b/libpod/container.log.go
index 7c46dde9a..514edb8c8 100644
--- a/libpod/container.log.go
+++ b/libpod/container.log.go
@@ -41,6 +41,7 @@ func (c *Container) readFromLogFile(options *logs.LogOptions, logChannel chan *l
if len(tailLog) > 0 {
for _, nll := range tailLog {
nll.CID = c.ID()
+ nll.CName = c.Name()
if nll.Since(options.Since) {
logChannel <- nll
}
@@ -63,6 +64,7 @@ func (c *Container) readFromLogFile(options *logs.LogOptions, logChannel chan *l
partial = ""
}
nll.CID = c.ID()
+ nll.CName = c.Name()
if nll.Since(options.Since) {
logChannel <- nll
}