]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev-rules: add missing device name prefix in log message
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 9 Aug 2025 00:07:35 +0000 (09:07 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 9 Aug 2025 10:41:57 +0000 (11:41 +0100)
Otherwise, it is hard to find the dump in journal. With this change,
we can find the entry by e.g.
journalctl -b -u systemd-udevd.service DEVICE=eth0

Follow-up for b4ffb776696bdd3a7345f73956ce7551f6b449ff.

src/udev/udev-rules.c

index 1f99b54a0d74fe6cc1f584c5c1988a6598371ee5..f82e18ee2aa34c77af02819189082fe81f9a53f2 100644 (file)
@@ -2607,7 +2607,7 @@ static int udev_rule_apply_token_to_event(
                 if (r < 0)
                         log_event_warning_errno(event, token, r, "Failed to finalize memory stream, ignoring: %m");
                 else
-                        log_info("%s", buf);
+                        log_device_info(dev, "%s", buf);
 
                 log_event_info(event, token, "DONE");
                 return true;