From: Lennart Poettering Date: Tue, 6 Apr 2010 20:01:06 +0000 (+0200) Subject: unit: automatically connect to syslog when it becomes available X-Git-Tag: 0.git+20100605+dfd8ee-1~246 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2882c7eda072e218516df584d2489f996d01dcf6;p=systemd unit: automatically connect to syslog when it becomes available --- diff --git a/unit.c b/unit.c index 1a0225a6..93c0d8d6 100644 --- a/unit.c +++ b/unit.c @@ -923,13 +923,13 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns) { if (unit_has_name(u, SPECIAL_SYSLOG_SERVICE)) /* The syslog daemon just got started, hence try to connect to it. */ - log_info("Syslog now available, this is where we should start logging to it."); + log_open_syslog(); } else if (UNIT_IS_ACTIVE_OR_RELOADING(os) && !UNIT_IS_ACTIVE_OR_RELOADING(ns)) { if (unit_has_name(u, SPECIAL_SYSLOG_SERVICE)) /* The syslog daemon just got terminated, hence try to disconnect from it. */ - log_info("Syslog now gone, this is where we should stio logging to it."); + log_close_syslog(); /* We don't care about D-Bus here, since we'll get an * asynchronous notification for it anyway. */