ok systemd experts, how the heck do I get the output of a oneshot container with LogDriver=passthrough into both journald _and_ a regular log file that's rotated daily? Similar use case as described here https://github.com/systemd/systemd/issues/38684#issuecomment-3221956220

I need simple log files for long term archiving

In the old world I'd just do "./program | tee -a /logs/$(date +%Y%m%d.log)"

Rotate StandardOutput= file when rotating logs ยท Issue #38684 ยท systemd/systemd

Component journalctl, systemd Description The most efficient way to write daemon logs into a specific file is using: [Service] StandardOutput=append:/var/log/xxx.log StandardError=append:/var/log/x...

GitHub

@job could try this:

[Unit]
Description=Container Task

[Service]
Type=oneshot
ExecStart=/usr/bin/podman run --rm --log-driver=passthrough my-image
StandardOutput=append:/var/log/my-container/task.log
StandardError=inherit

@job otherwise you can also tee into systemd-cat which adds its input to the journal. It has quite a few useful options.