diff options
author | Sebastian Thorarensen <sebth@naju.se> | 2014-03-14 00:38:15 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-03-14 22:05:25 +0100 |
commit | 40b71e89bae4e51768db4dc50ec64c1e9c96eec4 (patch) | |
tree | 39de34bcee5d996a8e98ef792fc7201276b0cf63 /src/journal/journald-native.c | |
parent | 9003d9b0d628be059922e522fd35f9c5b4d8b039 (diff) |
journald: add support for wall forwarding
This will let journald forward logs as messages sent to all logged in
users (like wall).
Two options are added:
* ForwardToWall (default yes)
* MaxLevelWall (default emerg)
'ForwardToWall' is overridable by kernel command line option
'systemd.journald.forward_to_wall'.
This is used to emulate the traditional syslogd behaviour of sending
emergency messages to all logged in users.
Diffstat (limited to 'src/journal/journald-native.c')
-rw-r--r-- | src/journal/journald-native.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c index 359d962c72..0509c1eaee 100644 --- a/src/journal/journald-native.c +++ b/src/journal/journald-native.c @@ -31,6 +31,7 @@ #include "journald-kmsg.h" #include "journald-console.h" #include "journald-syslog.h" +#include "journald-wall.h" /* Make sure not to make this smaller than the maximum coredump * size. See COREDUMP_MAX in coredump.c */ @@ -265,6 +266,9 @@ void server_process_native_message( if (s->forward_to_console) server_forward_console(s, priority, identifier, message, ucred); + + if (s->forward_to_wall) + server_forward_wall(s, priority, identifier, message, ucred); } server_dispatch_message(s, iovec, n, m, ucred, tv, label, label_len, NULL, priority, object_pid); |