]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: add trigger to path unit debug log
authorLuca Boccassi <luca.boccassi@gmail.com>
Mon, 27 Jan 2025 20:30:16 +0000 (20:30 +0000)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 8 Feb 2025 06:51:06 +0000 (15:51 +0900)
Useful for debugging, given it's already logging and the trigger
is known, add it

(cherry picked from commit 6566b4306a65bc7af6ade0cb6887217212925202)

src/core/path.c

index e0dc93aabd7a19f1cd8a5f467fdaa382b1c0d00b..c9ea31a74ea89e51e19aa8561c14e151cc64350c 100644 (file)
@@ -591,7 +591,7 @@ static void path_enter_waiting(Path *p, bool initial, bool from_trigger_notify)
         }
 
         if (path_check_good(p, initial, from_trigger_notify, &trigger_path)) {
-                log_unit_debug(UNIT(p), "Got triggered.");
+                log_unit_debug(UNIT(p), "Got triggered by '%s'.", trigger_path);
                 path_enter_running(p, trigger_path);
                 return;
         }
@@ -608,7 +608,7 @@ static void path_enter_waiting(Path *p, bool initial, bool from_trigger_notify)
          * recheck */
 
         if (path_check_good(p, false, from_trigger_notify, &trigger_path)) {
-                log_unit_debug(UNIT(p), "Got triggered.");
+                log_unit_debug(UNIT(p), "Got triggered by '%s'.", trigger_path);
                 path_enter_running(p, trigger_path);
                 return;
         }