Converts k8s-file logs from podman to syslog()
. Useful for systems
that don't have systemd-journald.
Runs best in the background with a FIFO as argument.
2024-02-16T15:08:45.594121067+00:00 stdout F Starting syslogd: OK
2024-02-16T15:08:45.594121067+00:00 stdout P Starting ntpd:
2024-02-16T15:08:45.788566992+00:00 stdout F OK
2024-02-16T15:08:45.791816404+00:00 stdout P Starting dropbear sshd:
2024-02-16T15:08:45.794263331+00:00 stdout F OK
2024-02-16T15:08:45.797041058+00:00 stdout P Starting mini-snmpd:
2024-02-16T15:08:45.799285816+00:00 stdout F OK
- Opens syslog connection with the given identity and facility
- Skips timestamp
- Logs everything not
stderr
asLOG_NOTICE
- Scoops up all partials (
P
) into the same log line - Sends full (
F
) logs tosyslog()
If the system runs sysklogd, and has libsyslog installed, the logger
will use syslogp()
instead and go dumpster diving for the PID of the
docker/podman process with a name matching the identity.