From 5731b02d9c3aacea3139038e1082d63e42e4f4e8 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 20 Jul 2016 09:28:02 +0100 Subject: [PATCH 02/11] bus_context_log: remove special handling of !context->syslog _dbus_log() and _dbus_logv() are always the right functions to call now. Signed-off-by: Simon McVittie Reviewed-by: Ralf Habacker Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97009 --- bus/bus.c | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/bus/bus.c b/bus/bus.c index 692f22f..a134dc6 100644 --- a/bus/bus.c +++ b/bus/bus.c @@ -1372,20 +1372,6 @@ bus_context_log (BusContext *context, DBusSystemLogSeverity severity, const char { va_list args; - if (!context->syslog) - { - /* we're not syslogging; just output to stderr */ - va_start (args, msg); - vfprintf (stderr, msg, args); - fprintf (stderr, "\n"); - va_end (args); - - if (severity == DBUS_SYSTEM_LOG_FATAL) - _dbus_exit (1); - - return; - } - va_start (args, msg); if (context->log_prefix) @@ -1422,18 +1408,7 @@ bus_context_log_literal (BusContext *context, DBusSystemLogSeverity severity, const char *msg) { - if (!context->syslog) - { - fputs (msg, stderr); - fputc ('\n', stderr); - - if (severity == DBUS_SYSTEM_LOG_FATAL) - _dbus_exit (1); - } - else - { - _dbus_log (severity, "%s%s", nonnull (context->log_prefix, ""), msg); - } + _dbus_log (severity, "%s%s", nonnull (context->log_prefix, ""), msg); } void -- 2.8.1