summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-10-10 22:11:24 +0000
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-10-18 21:33:52 +0200
commit23635a8547eac0c05922609f5930badc86faf080 (patch)
tree6cadef67a6cd2c3cb18e427445dba91594da2ff6 /src/core/unit.c
parentb66871dad9ae24a1249fe31b58b239640dd6271c (diff)
systemd: use structured logging for unit changes
Information which unit a log entry pertains to enables systemctl status to display more log messages.
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 6396bfc09f..99e1c27948 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -1438,7 +1438,10 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
check_unneeded_dependencies(u);
if (ns != os && ns == UNIT_FAILED) {
- log_notice("Unit %s entered failed state.", u->id);
+ log_struct(LOG_NOTICE,
+ "MESSAGE=Unit %s entered failed state", u->id,
+ "UNIT=%s", u->id,
+ NULL);
unit_trigger_on_failure(u);
}
}