summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-28 00:42:35 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-28 02:18:46 +0100
commit6c861f0aeff9449ee1201bb56f89861921e41c45 (patch)
tree0ad90b640c3c00ece1f732d37532471697f7cf1d /src/network/networkd-link.h
parentbca3e263cfc68f506bfbafb11680f35aa13c38a5 (diff)
networkd: update logging macros for parameter order, and errno, to match rest of the code
Diffstat (limited to 'src/network/networkd-link.h')
-rw-r--r--src/network/networkd-link.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/network/networkd-link.h b/src/network/networkd-link.h
index 61cdbf3132..56631757a9 100644
--- a/src/network/networkd-link.h
+++ b/src/network/networkd-link.h
@@ -132,14 +132,22 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(Link*, link_unref);
/* Macros which append INTERFACE= to the message */
-#define log_link_full(level, link, fmt, ...) log_object_internal(level, 0, __FILE__, __LINE__, __func__, "INTERFACE=", link->ifname, "%-*s: " fmt, IFNAMSIZ, link->ifname, ##__VA_ARGS__)
-#define log_link_debug(link, ...) log_link_full(LOG_DEBUG, link, ##__VA_ARGS__)
-#define log_link_info(link, ...) log_link_full(LOG_INFO, link, ##__VA_ARGS__)
-#define log_link_notice(link, ...) log_link_full(LOG_NOTICE, link, ##__VA_ARGS__)
-#define log_link_warning(link, ...) log_link_full(LOG_WARNING, link, ##__VA_ARGS__)
-#define log_link_error(link, ...) log_link_full(LOG_ERR, link, ##__VA_ARGS__)
-
-#define log_link_struct(level, link, ...) log_struct(level, "INTERFACE=%s", link->ifname, __VA_ARGS__)
+#define log_link_full(link, level, error, fmt, ...) \
+ log_object_internal(level, error, __FILE__, __LINE__, __func__, "INTERFACE=", link->ifname, "%-*s: " fmt, IFNAMSIZ, link->ifname, ##__VA_ARGS__)
+
+#define log_link_debug(link, ...) log_link_full(link, LOG_DEBUG, 0, ##__VA_ARGS__)
+#define log_link_info(link, ...) log_link_full(link, LOG_INFO, 0, ##__VA_ARGS__)
+#define log_link_notice(link, ...) log_link_full(link, LOG_NOTICE, 0, ##__VA_ARGS__)
+#define log_link_warning(link, ...) log_link_full(link, LOG_WARNING, 0, ##__VA_ARGS__)
+#define log_link_error(link, ...) log_link_full(link, LOG_ERR, 0, ##__VA_ARGS__)
+
+#define log_link_debug_errno(link, error, ...) log_link_full(link, LOG_DEBUG, error, ##__VA_ARGS__)
+#define log_link_info_errno(link, error, ...) log_link_full(link, LOG_INFO, error, ##__VA_ARGS__)
+#define log_link_notice_errno(link, error, ...) log_link_full(link, LOG_NOTICE, error, ##__VA_ARGS__)
+#define log_link_warning_errno(link, error, ...) log_link_full(link, LOG_WARNING, error, ##__VA_ARGS__)
+#define log_link_error_errno(link, error, ...) log_link_full(link, LOG_ERR, error, ##__VA_ARGS__)
+
+#define log_link_struct(link, level, ...) log_struct(level, "INTERFACE=%s", link->ifname, __VA_ARGS__)
#define ADDRESS_FMT_VAL(address) \
(address).s_addr & 0xFF, \