]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: log completion of remaining job types
authorMichal Schmidt <mschmidt@redhat.com>
Tue, 21 Jul 2015 14:20:18 +0000 (16:20 +0200)
committerMichal Schmidt <mschmidt@redhat.com>
Tue, 21 Jul 2015 17:24:20 +0000 (19:24 +0200)
JOB_RESTART and failed JOB_VERIFY_ACTIVE completions were printed to
console but not to the log.

src/core/job.c

index e3ad1ddc734d7602b187c5e9318d7d30a1906f31..0f0fe1994a70bbcf797fad675a1b267f4af275d2 100644 (file)
@@ -735,7 +735,7 @@ static void job_log_status_message(Unit *u, JobType t, JobResult result) {
                            "RESULT=%s", job_result_to_string(result),
                            NULL);
 
-        } else if (t == JOB_STOP)
+        } else if (t == JOB_STOP || t == JOB_RESTART)
                 log_struct(result == JOB_DONE ? LOG_INFO : LOG_ERR,
                            LOG_MESSAGE_ID(SD_MESSAGE_UNIT_STOPPED),
                            LOG_UNIT_ID(u),
@@ -750,6 +750,12 @@ static void job_log_status_message(Unit *u, JobType t, JobResult result) {
                            LOG_MESSAGE("%s", buf),
                            "RESULT=%s", job_result_to_string(result),
                            NULL);
+        else
+                log_struct(result == JOB_DONE ? LOG_INFO : LOG_ERR,
+                           LOG_UNIT_ID(u),
+                           LOG_MESSAGE("%s", buf),
+                           "RESULT=%s", job_result_to_string(result),
+                           NULL);
 }
 
 static void job_emit_status_message(Unit *u, JobType t, JobResult result) {