1podman-pod-logs(1)() podman-pod-logs(1)()
2
3
4
6 podman-pod-logs - Displays logs for pod with one or more containers
7
8
10 podman pod logs [options] pod
11
12
14 The podman pod logs command batch-retrieves whatever logs are present
15 with all the containers of a pod. Pod logs can be filtered by container
16 name or id using flag -c or --container if needed.
17
18
19 Note: Long running command of podman pod log with a -f or --follow
20 needs to be reinvoked if new container is added to the pod dynamically
21 otherwise logs of newly added containers would not be visible in log
22 stream.
23
24
26 --color
27 Output the containers with different colors in the log.
28
29
30 --container, -c
31 By default podman pod logs retrieves logs for all the containers avail‐
32 able within the pod differentiate by field container. However there are
33 use-cases where user would want to limit the log stream only to a par‐
34 ticular container of a pod for such cases -c can be used like podman
35 pod logs -c ctrNameorID podname.
36
37
38 --follow, -f
39 Follow log output. Default is false.
40
41
42 Note: If you are following a pod which is removed podman pod rm, then
43 there is a chance that the log file will be removed before podman pod
44 logs reads the final content.
45
46
47 --latest, -l
48 Instead of providing the pod name or id, get logs of the last created
49 pod. (This option is not available with the remote Podman client, in‐
50 cluding Mac and Windows (excluding WSL2) machines)
51
52
53 --names, -n
54 Output the container names instead of the container IDs in the log.
55
56
57 --since=TIMESTAMP
58 Show logs since TIMESTAMP. The --since option can be Unix timestamps,
59 date formatted timestamps, or Go duration strings (e.g. 10m, 1h30m)
60 computed relative to the client machine's time. Supported formats for
61 date formatted time stamps include RFC3339Nano, RFC3339,
62 2006-01-02T15:04:05, 2006-01-02T15:04:05.999999999, 2006-01-02Z07:00,
63 and 2006-01-02.
64
65
66 --tail=LINES
67 Output the specified number of LINES at the end of the logs. LINES
68 must be an integer. Defaults to -1, which prints all lines
69
70
71 --timestamps, -t
72 Show timestamps in the log outputs. The default is false
73
74
75 --until=TIMESTAMP
76 Show logs until TIMESTAMP. The --until option can be Unix timestamps,
77 date formatted timestamps, or Go duration strings (e.g. 10m, 1h30m)
78 computed relative to the client machine's time. Supported formats for
79 date formatted time stamps include RFC3339Nano, RFC3339,
80 2006-01-02T15:04:05, 2006-01-02T15:04:05.999999999, 2006-01-02Z07:00,
81 and 2006-01-02.
82
83
85 To view a pod's logs:
86
87
88 podman pod logs -t podIdorName
89
90
91
92 To view logs of a specific container on the pod
93
94
95 podman pod logs -c ctrIdOrName podIdOrName
96
97
98
99 To view all pod logs:
100
101
102 podman pod logs -t --since 0 myserver-pod-1
103
104
105
106 To view a pod's logs since a certain time:
107
108
109 podman pod logs -t --since 2017-08-07T10:10:09.055837383-04:00 myserver-pod-1
110
111
112
113 To view a pod's logs generated in the last 10 minutes:
114
115
116 podman pod logs --since 10m myserver-pod-1
117
118
119
120 To view a pod's logs until 30 minutes ago:
121
122
123 podman pod logs --until 30m myserver-pod-1
124
125
126
128 podman(1), podman-pod(1), podman-pod-rm(1), podman-logs(1)
129
130
131
132 podman-pod-logs(1)()