1podman-pod-logs(1) General Commands Manual podman-pod-logs(1)
2
3
4
6 podman-pod-logs - Display 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: A long-running podman pod log command with a -f or --follow op‐
20 tion needs to be reinvoked if a new container is added to the pod dy‐
21 namically; otherwise, logs of newly added containers are not visible in
22 the log 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
32 available within the pod, differentiated by the field container. How‐
33 ever, there are use cases where the user wants to limit the log stream
34 only to a particular container of a pod. For such cases, -c can be used
35 like podman pod logs -c ctrNameorID podname.
36
37
38 --follow, -f
39 Follow log output. Default is false.
40
41
42 Note: When following a pod which is removed by podman pod rm or removed
43 on exit (podman run --rm ...), there is a chance that the log file is
44 removed before podman pod logs reads the final content.
45
46
47 --latest, -l
48 Instead of providing the pod name or ID, use the last created pod.
49 Note: the last started pod can be from other users of Podman on the
50 host machine. (This option is not available with the remote Podman
51 client, including Mac and Windows (excluding WSL2) machines)
52
53
54 --names, -n
55 Output the container names instead of the container IDs in the log.
56
57
58 --since=TIMESTAMP
59 Show logs since TIMESTAMP. The --since option can be Unix timestamps,
60 date formatted timestamps, or Go duration strings (e.g. 10m, 1h30m)
61 computed relative to the client machine's time. Supported formats for
62 date formatted time stamps include RFC3339Nano, RFC3339,
63 2006-01-02T15:04:05, 2006-01-02T15:04:05.999999999, 2006-01-02Z07:00,
64 and 2006-01-02.
65
66
67 --tail=LINES
68 Output the specified number of LINES at the end of the logs. LINES
69 must be an integer. Defaults to -1, which prints all lines
70
71
72 --timestamps, -t
73 Show timestamps in the log outputs. The default is false
74
75
76 --until=TIMESTAMP
77 Show logs until TIMESTAMP. The --until option can be Unix timestamps,
78 date formatted timestamps, or Go duration strings (e.g. 10m, 1h30m)
79 computed relative to the client machine's time. Supported formats for
80 date formatted time stamps include RFC3339Nano, RFC3339,
81 2006-01-02T15:04:05, 2006-01-02T15:04:05.999999999, 2006-01-02Z07:00,
82 and 2006-01-02.
83
84
86 To view a pod's logs:
87
88 podman pod logs -t podIdorName
89
90
91
92 To view logs of a specific container on the pod
93
94 podman pod logs -c ctrIdOrName podIdOrName
95
96
97
98 To view all pod logs:
99
100 podman pod logs -t --since 0 myserver-pod-1
101
102
103
104 To view a pod's logs since a certain time:
105
106 podman pod logs -t --since 2017-08-07T10:10:09.055837383-04:00 myserver-pod-1
107
108
109
110 To view a pod's logs generated in the last 10 minutes:
111
112 podman pod logs --since 10m myserver-pod-1
113
114
115
116 To view a pod's logs until 30 minutes ago:
117
118 podman pod logs --until 30m myserver-pod-1
119
120
121
123 podman(1), podman-pod(1), podman-pod-rm(1), podman-logs(1)
124
125
126
127 podman-pod-logs(1)