]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-ipv4acd,sd-ipv4ll: include interface name in the debug logs
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 2 Dec 2020 06:21:35 +0000 (15:21 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 2 Dec 2020 09:42:13 +0000 (18:42 +0900)
src/libsystemd-network/sd-ipv4acd.c
src/libsystemd-network/sd-ipv4ll.c

index 9d6638af484d9d516215a3c948c7a4341aee2e88..1bf0fb18f3d8d9d759dc1b869b3936464cfbeca8 100644 (file)
@@ -18,6 +18,7 @@
 #include "fd-util.h"
 #include "format-util.h"
 #include "in-addr-util.h"
+#include "log-link.h"
 #include "random-util.h"
 #include "siphash24.h"
 #include "string-util.h"
@@ -73,8 +74,10 @@ struct sd_ipv4acd {
         void* userdata;
 };
 
-#define log_ipv4acd_errno(acd, error, fmt, ...) log_internal(LOG_DEBUG, error, PROJECT_FILE, __LINE__, __func__, "IPV4ACD: " fmt, ##__VA_ARGS__)
-#define log_ipv4acd(acd, fmt, ...) log_ipv4acd_errno(acd, 0, fmt, ##__VA_ARGS__)
+#define log_ipv4acd_errno(acd, error, fmt, ...)                         \
+        log_interface_full_errno(sd_ipv4acd_get_ifname(acd), LOG_DEBUG, error, "IPV4ACD: " fmt, ##__VA_ARGS__)
+#define log_ipv4acd(acd, fmt, ...)                      \
+        log_ipv4acd_errno(acd, 0, fmt, ##__VA_ARGS__)
 
 static void ipv4acd_set_state(sd_ipv4acd *acd, IPv4ACDState st, bool reset_counter) {
         assert(acd);
index 5cf3c66b0c3fe7a8c892c6fb17d37710af3e1271..3af7d89bf076f3627f8aca04217f1056948c8d68 100644 (file)
@@ -15,7 +15,7 @@
 #include "alloc-util.h"
 #include "ether-addr-util.h"
 #include "in-addr-util.h"
-#include "list.h"
+#include "log-link.h"
 #include "random-util.h"
 #include "siphash24.h"
 #include "sparse-endian.h"
@@ -49,8 +49,10 @@ struct sd_ipv4ll {
         void* userdata;
 };
 
-#define log_ipv4ll_errno(ll, error, fmt, ...) log_internal(LOG_DEBUG, error, PROJECT_FILE, __LINE__, __func__, "IPV4LL: " fmt, ##__VA_ARGS__)
-#define log_ipv4ll(ll, fmt, ...) log_ipv4ll_errno(ll, 0, fmt, ##__VA_ARGS__)
+#define log_ipv4ll_errno(ll, error, fmt, ...)                           \
+        log_interface_full_errno(sd_ipv4ll_get_ifname(ll), LOG_DEBUG, error, "IPV4LL: " fmt, ##__VA_ARGS__)
+#define log_ipv4ll(ll, fmt, ...)                        \
+        log_ipv4ll_errno(ll, 0, fmt, ##__VA_ARGS__)
 
 static void ipv4ll_on_acd(sd_ipv4acd *ll, int event, void *userdata);