From b348117a800293309512bc09fb380b32843ee767 Mon Sep 17 00:00:00 2001 From: ds Date: Sat, 28 Jun 2025 16:02:17 +0300 Subject: [PATCH] Show logs for each container independently --- newsfragments/fix-compose-logs.bugfix | 1 + podman_compose.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 newsfragments/fix-compose-logs.bugfix diff --git a/newsfragments/fix-compose-logs.bugfix b/newsfragments/fix-compose-logs.bugfix new file mode 100644 index 00000000..2a0d1029 --- /dev/null +++ b/newsfragments/fix-compose-logs.bugfix @@ -0,0 +1 @@ +Fixes the issue with compose logs for multiple targets when any container is missing diff --git a/podman_compose.py b/podman_compose.py index f7c2682b..669231a0 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -3553,9 +3553,10 @@ async def compose_logs(compose: PodmanCompose, args: argparse.Namespace) -> None podman_args.append("-t") if args.until: podman_args.extend(["--until", args.until]) + # podman logs supports multiple targets, + # but will fail completely if any container is missing for target in targets: - podman_args.append(target) - await compose.podman.run([], "logs", podman_args) + await compose.podman.run([], "logs", [*podman_args, target]) @cmd_run(podman_compose, "config", "displays the compose file")