diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-04-06 22:01:06 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-04-06 22:01:06 +0200 |
commit | 2882c7eda072e218516df584d2489f996d01dcf6 (patch) | |
tree | 76c8021e95d2693f305e74dd47add74e560fefb1 | |
parent | 4ade7963ed9c2a0d1a248d291a6fc9a4c4bad8de (diff) |
unit: automatically connect to syslog when it becomes available
-rw-r--r-- | unit.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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. */ |