[systemd-devel] [PACKAGERS] rsyslog and systemd

Lennart Poettering lennart at poettering.net
Mon Mar 7 14:49:45 PST 2011


in the past weeks a couple of folks have been asking about the rsyslog
and systemd glue in systemd, and I never responded since this was still
work in progress. Things should be all resolved now, so here's a
heads-up in how things should work now:

I have just sent a patch to rsyslog upstream:


This has the effect of making rsyslog and systemd-kmsg-syslogd listen on
the exact same socket, so that we can start the latter during early boot
and then replace it with the former during late boot, thus providing
continuous logging from the point in time we systemd gets invoked up all
the way to the end. And since systemd-kmsg-syslogd writes all /dev/log
messages to kmsg and rsyslog flushes kmsg to disk as first thing we end
up with a full set of messages on disk.

For this to work properly you need to run current git (I'll probably
release systemd 20 very soon though).

Something similar is thinkable with syslog-ng, but I have not closely
looked into this, and due to some weird choices in syslog-ng is probably
not totally straighforward (for example, for some weird reason syslog-ng
defaults to SOCK_STREAM logging instead of SOCK_DGRAM logging, which
corrupts the global ordering of messages, is more complex to maintain
and causes messages to be lost if socket activation is used when it is
restarted, even though socket activation would normally allow this to be
done without any loss of messages. Poort choice. My recommendation is to
use rsyslog anyway.)


Lennart Poettering - Red Hat, Inc.

More information about the systemd-devel mailing list