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