Hello,

I've been trying to figure out the best way to support legacy applications
that don't support syslog for logging. The best we can do, I think, is to
use fifo and have another process read the fifo to journald.


I made the following unit journald-fifo@.service


[Unit]

Description=A fifo for logging to journald

AssertPathExists=/var/log/%i.fifo


[Service]

Type=simple

ExecStart=/bin/sh -c 'while true; do systemd-cat -t %i < /var/log/%i.fifo;
done'

Nice=5


[Install]

WantedBy=multi-user.target

I was wondering is this a good approach? Is there a better way? (of course,
we'd like to fix the original software to work better).


Finally, if this is a good approach, is this method worth putting into
systemd/journald as a standard service? If so, how do I submit a PR or
where to begin?


Kind regards,

Samuel
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to