From ff5b9f16632dcab4be6d0f666263f58ad668c105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20Br=C3=A4unlich?= Date: Tue, 27 Jul 2021 11:25:01 +0200 Subject: [PATCH] Support for logging --- podman_compose.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/podman_compose.py b/podman_compose.py index e365369..52713d3 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -655,6 +655,11 @@ def container_to_args(compose, cnt, detached=True): for volume in cnt.get('volumes', []): # TODO: should we make it os.path.realpath(os.path.join(, i))? podman_args.extend(get_mount_args(compose, cnt, volume)) + log = cnt.get('logging') + if log is not None: + podman_args.append(f'--log-driver={log.get("driver", "k8s-file")}') + log_opts = log.get('options') or {} + podman_args += [f'--log-opt={name}={value}' for name, value in log_opts.items()] for secret in cnt.get('secrets', []): podman_args.extend(get_secret_args(compose, cnt, secret)) for i in cnt.get('extra_hosts', []):