From 345ab9d1fcdc568977a264af6d67f01ea92f88e2 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 16 Mar 2011 14:52:39 +0000 Subject: [PATCH 6/6] bus_context_log: divert messages to stderr if we're not using syslog --- bus/bus.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/bus/bus.c b/bus/bus.c index 19aefcc..c9253ce 100644 --- a/bus/bus.c +++ b/bus/bus.c @@ -23,6 +23,9 @@ #include #include "bus.h" + +#include + #include "activation.h" #include "connection.h" #include "services.h" @@ -36,6 +39,7 @@ #include #include #include + #ifdef DBUS_CYGWIN #include #endif @@ -1283,7 +1287,14 @@ bus_context_log (BusContext *context, DBusSystemLogSeverity severity, const char va_list args; if (!context->syslog) - return; + { + /* we're not syslogging; just output to stderr */ + va_start (args, msg); + vfprintf (stderr, msg, args); + fprintf (stderr, "\n"); + va_end (args); + return; + } va_start (args, msg); -- 1.7.4.1