mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-09 06:08:01 +02:00
sysdeps: Don't use LOG_PERROR if systemd is booted
Otherwise we get duplicated log output, since stdout/stderr are connected to the journal by default. https://bugs.freedesktop.org/show_bug.cgi?id=61399
This commit is contained in:
parent
4d41d120d8
commit
88642f6fee
1 changed files with 7 additions and 4 deletions
|
|
@ -429,13 +429,16 @@ void
|
|||
_dbus_init_system_log (void)
|
||||
{
|
||||
#ifdef HAVE_SYSLOG_H
|
||||
int logopts = LOG_PID;
|
||||
|
||||
#if HAVE_DECL_LOG_PERROR
|
||||
openlog ("dbus", LOG_PID | LOG_PERROR, LOG_DAEMON);
|
||||
#else
|
||||
openlog ("dbus", LOG_PID, LOG_DAEMON);
|
||||
#ifdef HAVE_DECL_LOG_PERROR
|
||||
#ifdef HAVE_SYSTEMD
|
||||
if (sd_booted () <= 0)
|
||||
#endif
|
||||
logopts |= LOG_PERROR;
|
||||
#endif
|
||||
|
||||
openlog ("dbus", logopts, LOG_DAEMON);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue