.nh .TH podman-pod-logs 1 .SH NAME .PP podman-pod-logs - Displays logs for pod with one or more containers .SH SYNOPSIS .PP \fBpodman pod logs\fP [\fIoptions\fP] \fIpod\fP .SH DESCRIPTION .PP The podman pod logs command batch-retrieves whatever logs are present with all the containers of a pod. Pod logs can be filtered by container name or id using flag \fB-c\fP or \fB--container\fP if needed. .PP Note: Long running command of \fB\fCpodman pod log\fR with a \fB\fC-f\fR or \fB\fC--follow\fR needs to be reinvoked if new container is added to the pod dynamically otherwise logs of newly added containers would not be visible in log stream. .SH OPTIONS .SS \fB--color\fP .PP Output the containers with different colors in the log. .SS \fB--container\fP, \fB-c\fP .PP By default \fB\fCpodman pod logs\fR retrieves logs for all the containers available within the pod differentiate by field \fB\fCcontainer\fR\&. However there are use-cases where user would want to limit the log stream only to a particular container of a pod for such cases \fB\fC-c\fR can be used like \fB\fCpodman pod logs -c ctrNameorID podname\fR\&. .SS \fB--follow\fP, \fB-f\fP .PP Follow log output. Default is false. .PP Note: If you are following a pod which is removed by \fB\fCpodman pod rm\fR or removed on exit (\fB\fCpodman run --rm ...\fR), then there is a chance that the log file will be removed before \fB\fCpodman pod logs\fR reads the final content. .SS \fB--latest\fP, \fB-l\fP .PP Instead of providing the pod name or id, get logs of the last created pod. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) .SS \fB--names\fP, \fB-n\fP .PP Output the container names instead of the container IDs in the log. .SS \fB--since\fP=\fITIMESTAMP\fP .PP Show logs since TIMESTAMP. The --since option can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. 10m, 1h30m) computed relative to the client machine's time. Supported formats for date formatted time stamps include RFC3339Nano, RFC3339, 2006-01-02T15:04:05, 2006-01-02T15:04:05.999999999, 2006-01-02Z07:00, and 2006-01-02. .SS \fB--tail\fP=\fILINES\fP .PP Output the specified number of LINES at the end of the logs. LINES must be an integer. Defaults to -1, which prints all lines .SS \fB--timestamps\fP, \fB-t\fP .PP Show timestamps in the log outputs. The default is false .SS \fB--until\fP=\fITIMESTAMP\fP .PP Show logs until TIMESTAMP. The --until option can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. 10m, 1h30m) computed relative to the client machine's time. Supported formats for date formatted time stamps include RFC3339Nano, RFC3339, 2006-01-02T15:04:05, 2006-01-02T15:04:05.999999999, 2006-01-02Z07:00, and 2006-01-02. .SH EXAMPLE .PP To view a pod's logs: .PP .RS .nf podman pod logs -t podIdorName .fi .RE .PP To view logs of a specific container on the pod .PP .RS .nf podman pod logs -c ctrIdOrName podIdOrName .fi .RE .PP To view all pod logs: .PP .RS .nf podman pod logs -t --since 0 myserver-pod-1 .fi .RE .PP To view a pod's logs since a certain time: .PP .RS .nf podman pod logs -t --since 2017-08-07T10:10:09.055837383-04:00 myserver-pod-1 .fi .RE .PP To view a pod's logs generated in the last 10 minutes: .PP .RS .nf podman pod logs --since 10m myserver-pod-1 .fi .RE .PP To view a pod's logs until 30 minutes ago: .PP .RS .nf podman pod logs --until 30m myserver-pod-1 .fi .RE .SH SEE ALSO .PP \fBpodman(1)\fP, \fBpodman-pod(1)\fP, \fBpodman-pod-rm(1)\fP, \fBpodman-logs(1)\fP