mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-02-03 06:40:25 +01:00
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:
parent
92bd5ef290
commit
04bfdb3dbf
1 changed files with 1 additions and 26 deletions
27
bus/bus.c
27
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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue