mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Add the names flag for pod logs
Fixes containers#13261 Signed-off-by: Xueyuan Chen <X.Chen-47@student.tudelft.nl>
This commit is contained in:

committed by
Xueyuan Chen

parent
c39dffe83d
commit
40c6192e9e
@ -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
|
||||
|
Reference in New Issue
Block a user