bus_context_log: remove special handling of !context->syslog
authorSimon McVittie <smcv@debian.org>
Wed, 20 Jul 2016 08:28:02 +0000 (09:28 +0100)
committerSimon McVittie <smcv@debian.org>
Fri, 30 Sep 2016 18:36:50 +0000 (19:36 +0100)
_dbus_log() and _dbus_logv() are always the right functions to call now.

Signed-off-by: Simon McVittie <smcv@debian.org>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97009

bus/bus.c

index 692f22f..a134dc6 100644 (file)
--- 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