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