[systemd-devel] logging in RAM and journald configuration issue

Lennart Poettering lennart at poettering.net
Wed Mar 20 18:57:14 UTC 2019


On Mi, 20.03.19 18:08, Dave Howorth (systemd at howorth.org.uk) wrote:

>
> At present AFAICT the log2ram.service runs
> Before=systemd-journald.service and various other services, so I think
> that aspect is covered.

I'd be careful with that. If you have a service that runs before
journald you need to be very careful with the deps and also ensure you
explicitly turn off stdout/stderr connection to journald, and avoid
using the syslog() API (since that might deadlock, if you are ordered
before journald, as this will trigger activation-by-socket but you are
also blocking precisely that activation).

I am not sure what this service does, but if all you want to do is
make changes to /var/log/journal before journald writes there it
should be sufficient to order it before systemd-journal-flush.service
which is nowadays the clear boundary when journald starts writing to
/var.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list