log: Add support for journal logging

This logging is available if the software was build with the configure
option --with-systemd-journal.

It will be enabled by default if libsystemd is found.

The runtime parameter --log-journal enables to output of log messages
to the systemd journal.

Please note that the journal priority field has the same value as the
syslog level so no conversion is required here.
This commit is contained in:
Torsten Hilbrich
2017-06-21 13:08:17 +02:00
committed by Aleksander Morgado
parent 13592c5d2d
commit fd0bed1df9
8 changed files with 109 additions and 0 deletions
+3
View File
@@ -50,6 +50,9 @@ messages are logged. Given level must be one of "ERR", "WARN", "INFO" or "DEBUG"
Specify location of the file where ModemManager will dump its log messages,
instead of syslog.
.TP
.B \-\-log\-journal
Output log message to the systemd journal.
.TP
.B \-\-log\-timestamps
Include absolute timestamps in the log output.
.TP