diff options
author | Abhijeet Kasurde <akasurde@redhat.com> | 2020-02-18 16:16:23 +0530 |
---|---|---|
committer | Abhijeet Kasurde <akasurde@redhat.com> | 2020-02-19 16:58:04 +0530 |
commit | 88a8d9e3fa19cf16b19716cb03fa457d98056010 (patch) | |
tree | f59c42ca52c97008ec2068dbfbebbf40ec1249cf /libpod/container.log.go | |
parent | 0bd29f89e9d26c9012c76e58050e1bdfd90faaf0 (diff) | |
download | podman-88a8d9e3fa19cf16b19716cb03fa457d98056010.tar.gz podman-88a8d9e3fa19cf16b19716cb03fa457d98056010.tar.bz2 podman-88a8d9e3fa19cf16b19716cb03fa457d98056010.zip |
[WIP] Add cmd flag to show container name in log
This flag allows user to show container name in podman log command
Fixes: #4962
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Diffstat (limited to 'libpod/container.log.go')
-rw-r--r-- | libpod/container.log.go | 2 |
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 } |