podman-pod-logs(1)

πŸ“¦
version 6.1.4 Β· 5 versions
, in arch rolling, fedora 43, fedora 44, ubuntu resolute

πŸ’– podman-pod-logs β€” bestie edition πŸ’–

okay so real quick, this is podman-pod-logs from the General Commands Manual, section 1. it's a whole vibe, let's get into it 🫢


✨ NAME ✨

podman-pod-logs β€” pull up the logs for a pod that's got one or more containers in it πŸ“œ


🌸 SYNOPSIS 🌸

podman pod logs [options] pod

like. that's it. that's the whole entrance. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so podman pod logs batch-retrieves whatever logs are present with all the containers of a pod. all of them. at once. it's giving group project but everyone actually showed up.

and if you're not tryna read every single container's receipts, pod logs can be filtered by container name or ID using the -c or --container flag. yesss, pick your fave. πŸŽ€

Note: a long-running podman pod log command with a -f or --follow option needs to be reinvoked if a new container gets added to the pod dynamically. otherwise, logs of newly added containers are not visible in the log stream. like, the stream literally doesn't know about the new girl. so if you added a container mid-follow, you gotta re-run it. no cap. 😭

πŸ’… OPTIONS πŸ’…

  • --color β€” outputs the containers with different colors in the log. rainbow moment, very slay. 🌈
  • --container, -c β€” by default, podman pod logs retrieves logs for all the containers available within the pod, differentiated by the field container. but sometimes you're in your main character era and you only want the log stream for one particular container of a pod. for those cases, use -c like podman pod logs -c ctrNameorID podname. 🎯
  • --follow, -f β€” follow log output. default is false.
Note: when following a pod that gets removed by podman pod rm or removed on exit (podman run --rm ...), there's a chance that the log file is removed before podman pod logs reads the final content. yeah. it's a race condition bestie, sometimes the file just dips early πŸ’€
  • --latest, -l β€” instead of providing the pod name or ID, use the last created pod.
Note: the last started pod can be from other users of Podman on the host machine. πŸ‘€ (this option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
  • --names, -n β€” output the container names instead of the container IDs in the log. so much more readable, we love a name drop. ✨
  • --since=TIMESTAMP β€” 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. so many options and every single one is valid πŸ’œ
  • --tail=LINES β€” output the specified number of LINES at the end of the logs. LINES must be an integer. defaults to -1, which prints all lines. (yes, -1 means everything, it's giving "no limits".)
  • --timestamps, -t β€” show timestamps in the log outputs. the default is false. ⏰
  • --until=TIMESTAMP β€” 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. same formats as --since, iconic symmetry. πŸͺž

πŸ“ EXAMPLE πŸ“

to view a pod's logs:

podman pod logs -t podIdorName

to view logs of a specific container on the pod:

podman pod logs -c ctrIdOrName podIdOrName

to view all pod logs:

podman pod logs -t --since 0 myserver-pod-1

to view a pod's logs since a certain time:

podman pod logs -t --since 2017-08-07T10:10:09.055837383-04:00 myserver-pod-1

to view a pod's logs generated in the last 10 minutes:

podman pod logs --since 10m myserver-pod-1

to view a pod's logs until 30 minutes ago:

podman pod logs --until 30m myserver-pod-1

go off bestie, run every single one of these, they all ate πŸ”₯


🧚 SEE ALSO 🧚

podman(1), podman-pod(1), podman-pod-rm(1), podman-logs(1)

like yeah, go read those too, they're the supporting cast and they understood the assignment πŸ‘‘


and that's the whole page!! brought to you by the General Commands Manual, podman-pod-logs(1), section 1 β€” mwah, take care of her, she's doing her best πŸ’–πŸŒΈπŸ¦‹βœ¨πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from