log: Add support for the systemd journal

The journal is a component of systemd, that captures Syslog messages,
Kernel log messages, initial RAM disk and early boot messages as well
as messages written to STDOUT/STDERR of all services, indexes them and
makes this available to the user.

It can be used in parallel, or in place of a traditional syslog daemon,
such as rsyslog or syslog-ng.

The journal offers a couple of improvements over traditional logging
facilities (e.g. advanced filtering capabilities).

This patch adds support for logging directly to the journal using its
native API.
This commit is contained in:
poljar (Damir Jelić) 2013-12-03 01:09:56 +01:00 committed by Peter Meerwald
parent a8fea5c468
commit d20ee7e7f2
8 changed files with 113 additions and 19 deletions

View file

@ -35,6 +35,9 @@
typedef enum pa_log_target_type {
PA_LOG_STDERR, /* default */
PA_LOG_SYSLOG,
#ifdef HAVE_JOURNAL
PA_LOG_JOURNAL, /* systemd journal */
#endif
PA_LOG_NULL, /* to /dev/null */
PA_LOG_FILE, /* to a user specified file */
PA_LOG_NEWFILE, /* with an automatic suffix to avoid overwriting anything */