From 40b71e89bae4e51768db4dc50ec64c1e9c96eec4 Mon Sep 17 00:00:00 2001 From: Sebastian Thorarensen Date: Fri, 14 Mar 2014 00:38:15 +0100 Subject: 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. --- src/journal/journald-native.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/journal/journald-native.c') 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); -- cgit v1.2.3-54-g00ecf