podman-logs(1)
β¨ podman-logs β¨ β Display the logs of one or more containers π
okay bestie, welcome to the General Commands Manual section for podman-logs π«Ά this is the page where your containers spill ALL the tea about what they've been up to, and we're gonna read every word. no cap.
π SYNOPSIS
podman logs [options] container [container...]
podman container logs [options] container [container...]
πΈ DESCRIPTION
The podman logs command batch-retrieves whatever logs are present for one or more containers at the time of execution. Periodt. π
but likeβ¦ it does not guarantee execution order when you combine it with podman run β meaning the run might not have generated any logs yet at the exact moment podman logs ran. so yeah, timing is giving chaotic energy sometimes π that's just how it is.
β¨ OPTIONS β¨
--colorβ outputs the containers with different colors in the log π cute AND functional, we love a multicolor moment.--follow,-fβ follows the log output, live and unhinged. default isfalse.
π note, bestie: when you're following a container that gets removed bypodman container rm, or that's set to be removed on exit (podman run --rm ...), there's a chance the log file gets yeeted beforepodman logsreads the final content. so the last lil bit might ghost you. sad but true π
--latest,-lβ instead of handing over a container name or ID, it just uses the last created container.
π note: that last started container can belong to other users of Podman on the host machine, so likeβ¦ be aware. (this option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
--names,-nβ outputs the container names instead of the container IDs in the log. name-drop era π--since=TIMESTAMPβ shows logs since TIMESTAMP. the--sinceoption 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 includeRFC3339Nano,RFC3339,2006-01-02T15:04:05,2006-01-02T15:04:05.999999999,2006-01-02Z07:00, and2006-01-02. yes, all of them. she's flexible like that π--tail=LINESβ outputs the specified number of LINES at the end of the logs. LINES must be an integer. defaults to-1, which prints all lines. the whole thing. the entire saga π--timestamps,-tβ shows timestamps in the log outputs. the default isfalse. π--until=TIMESTAMPβ shows logs until TIMESTAMP. the--untiloption 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 includeRFC3339Nano,RFC3339,2006-01-02T15:04:05,2006-01-02T15:04:05.999999999,2006-01-02Z07:00, and2006-01-02. same energy as--since, just the other direction π¦
π EXAMPLE
to view a container's logs:
podman logs -t b3f2436bdb978c1d33b1387afb5d7ba7e3243ed2ce908db431ac0069da86cb45
2017/08/07 10:16:21 Seeked /var/log/crio/pods/eb296bd56fab164d4d3cc46e5776b54414af3bf543d138746b25832c816b933b/c49f49788da14f776b7aa93fb97a2a71f9912f4e5a3e30397fca7dfe0ee0367b.log - &{Offset:0 Whence:0}
1:C 07 Aug 14:10:09.055 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 07 Aug 14:10:09.055 # Redis version=4.0.1, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 07 Aug 14:10:09.055 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
1:M 07 Aug 14:10:09.055 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
1:M 07 Aug 14:10:09.055 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
1:M 07 Aug 14:10:09.055 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
1:M 07 Aug 14:10:09.056 * Running mode=standalone, port=6379.
1:M 07 Aug 14:10:09.056 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
1:M 07 Aug 14:10:09.056 # Server initialized
to view only the last two lines in container's log:
podman logs --tail 2 b3f2436bdb97
# WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
# Server initialized
to view all containers logs:
podman logs -t --since 0 myserver
1:M 07 Aug 14:10:09.055 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
1:M 07 Aug 14:10:09.055 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
1:M 07 Aug 14:10:09.056 * Running mode=standalone, port=6379.
1:M 07 Aug 14:10:09.056 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
1:M 07 Aug 14:10:09.056 # Server initialized
to view a container's logs since a certain time:
podman logs -t --since 2017-08-07T10:10:09.055837383-04:00 myserver
1:M 07 Aug 14:10:09.055 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
1:M 07 Aug 14:10:09.055 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
1:M 07 Aug 14:10:09.056 * Running mode=standalone, port=6379.
1:M 07 Aug 14:10:09.056 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
1:M 07 Aug 14:10:09.056 # Server initialized
to view a container's logs generated in the last 10 minutes:
podman logs --since 10m myserver
# Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
# Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit, Increase 'ulimit -n' when higher maxclients are required.
to view a container's logs until 30 minutes ago:
podman logs --until 30m myserver
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.0.2.100. Set the 'ServerName' directive globally to suppress this message
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.0.2.100. Set the 'ServerName' directive globally to suppress this message
[Tue Jul 20 13:18:14.223727 2021] [mpm_event:notice] [pid 1:tid 140021067187328] AH00489: Apache/2.4.48 (Unix) configured -- resuming normal operations
[Tue Jul 20 13:18:14.223819 2021] [core:notice] [pid 1:tid 140021067187328] AH00094: Command line: 'httpd -D FOREGROUND'
π SEE ALSO
podman(1), podman-run(1), podman-rm(1)
π HISTORY
February 2018, Updated by Brent Baude bbaude@redhat.com β¨mailto:bbaude@redhat.comβ©
August 2017, Originally compiled by Ryan Cole rycole@redhat.com β¨mailto:rycole@redhat.comβ©
and that's the whole page, bestie π«Ά this one lives in the General Commands Manual, filed under podman-logs(1), and it's giving iconic documentation energy from start to finish. go read those logs. slay. π
β¨π
π¦ where this page comes from
- arch rolling: podman-docker 6.1.4-1 Β· Apache-2.0
- fedora 43: podman-docker 5:5.6.2-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 43: podman-docker 5:5.8.4-1.fc43
- fedora 43: podman-docker 5:5.8.8-1.fc43
- fedora 43: podman-docker 5:5.8.9-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 44: podman-docker 5:5.8.1-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 44: podman-docker 5:5.8.7-1.fc44
- fedora 44: podman-docker 5:5.8.9-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- ubuntu resolute: podman-docker 5.7.0+ds2-3build1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms