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 I'm by no means an expert. A few ideas in the order of personal preference:

Daily cronjob that dumps last day's journal entries for the unit into a file.

Have systemd unit run a .sh file that does the "program | tee" thing.

Use ForwardToSyslog=yes in journald.conf and configure syslog+logrotate/etc. to do the right thing