core: log a recognizable message when a unit succeeds, too

We already are doing it on failure, let's do it on success, too.

Fixes: #10265
This commit is contained in:
Lennart Poettering
2018-11-16 15:22:48 +01:00
parent 91bbd9b796
commit 523ee2d414
12 changed files with 44 additions and 8 deletions
+3 -1
View File
@@ -288,7 +288,9 @@ static void timer_enter_dead(Timer *t, TimerResult f) {
if (t->result == TIMER_SUCCESS)
t->result = f;
if (t->result != TIMER_SUCCESS)
if (t->result == TIMER_SUCCESS)
unit_log_success(UNIT(t));
else
unit_log_failure(UNIT(t), timer_result_to_string(t->result));
timer_set_state(t, t->result != TIMER_SUCCESS ? TIMER_FAILED : TIMER_DEAD);