923a60
From 010b80c6215da7357114911f46742939772e18fc Mon Sep 17 00:00:00 2001
923a60
From: Michal Schmidt <mschmidt@redhat.com>
923a60
Date: Tue, 21 Jul 2015 16:20:18 +0200
923a60
Subject: [PATCH] core: log completion of remaining job types
923a60
923a60
JOB_RESTART and failed JOB_VERIFY_ACTIVE completions were printed to
923a60
console but not to the log.
923a60
923a60
(cherry picked from commit 4f29c6fea6a6c5c2c9406ad091cd6f56da21e2cb)
923a60
923a60
Related: #1506256
923a60
---
923a60
 src/core/job.c | 9 +++++++--
923a60
 1 file changed, 7 insertions(+), 2 deletions(-)
923a60
923a60
diff --git a/src/core/job.c b/src/core/job.c
923a60
index 5e582b3d3c..086050aa75 100644
923a60
--- a/src/core/job.c
923a60
+++ b/src/core/job.c
923a60
@@ -743,8 +743,7 @@ static void job_log_status_message(Unit *u, JobType t, JobResult result) {
923a60
                                 LOG_MESSAGE("%s", buf),
923a60
                                 "RESULT=%s", job_result_to_string(result),
923a60
                                 NULL);
923a60
-
923a60
-        } else if (t == JOB_STOP)
923a60
+        } else if (t == JOB_STOP || t == JOB_RESTART)
923a60
                 log_unit_struct(u->id,
923a60
                                 result == JOB_DONE ? LOG_INFO : LOG_ERR,
923a60
                                 LOG_MESSAGE_ID(SD_MESSAGE_UNIT_STOPPED),
923a60
@@ -759,6 +758,12 @@ static void job_log_status_message(Unit *u, JobType t, JobResult result) {
923a60
                                 LOG_MESSAGE("%s", buf),
923a60
                                 "RESULT=%s", job_result_to_string(result),
923a60
                                 NULL);
923a60
+        else
923a60
+                log_unit_struct(u->id,
923a60
+                                result == JOB_DONE ? LOG_INFO : LOG_ERR,
923a60
+                                LOG_MESSAGE("%s", buf),
923a60
+                                "RESULT=%s", job_result_to_string(result),
923a60
+                                NULL);
923a60
 }
923a60
 
923a60
 static void job_emit_status_message(Unit *u, JobType t, JobResult result) {