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
I'm not the only one struggling with what at first glance would appear to be a simple requirement... https://serverfault.com/questions/1103320/systemd-standardoutput-to-a-file-and-to-the-journal
systemd StandardOutput to a file _and_ to the journal?

I am regularly doing a long running (~5 day) data processing programme. I'm using Ubuntu and running the command with a systemd transient task via systemd-run --unit data_import /path/to/my-script....

Server Fault
@job Yea one would think so. Or indeed pass it true rsyslog for it, or have a from job that dumps them daily orso.
@evey I find it somewhat unsatisfying to have to install another syslog daemon alongside journald … what is the purpose of journald then?
@job The idea of journald is to store it all in there own "efficent" format. And keep stuff in memory to only periodicly flush stuff to disk (if enabled). And offer better filtering methods to get the stuff out. Plus allowing also json and other log formats (Orso i personally don't like the design it breaks to often).
@evey store “efficiently” but it’s circular buffers and I wanna store forever… so it’s not durable materialisation it seems.

@job You can just configure journalctl to store it persistant to disk, in there own format. Altho that also has its issues to some degree.

With Storage=persistent

But agreed it all is quite a mess and really feels people with little operational experience designed it tbh.

@evey @job "But agreed it all is quite a mess and really feels people with little operational experience designed it tbh."

Perfect description of journald. Designed by developers who thought they know what operators need, but never considered asking an actual operator. Oh and they clearly knew the Windows event log and considered it "good".

Some of the ideas are really good, but it overall feels like a knife that is all blade no handle.