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 <smcv@debian.org>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=97009
This commit is contained in:
Simon McVittie 2016-07-20 09:28:02 +01:00
parent 92bd5ef290
commit 04bfdb3dbf

View file

@ -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