diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-11-27 20:20:23 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-11-27 22:05:24 +0100 |
commit | 79008bddf679a5e0900369950eb346c9fa687107 (patch) | |
tree | 620eed51b44a64aa065c4184a4661c8c95c146e3 /src/network/networkd.h | |
parent | e09ca588d25a0c383880d6c2f5b129296af781ab (diff) |
log: rearrange log function naming
- Rename log_meta() → log_internal(), to follow naming scheme of most
other log functions that are usually invoked through macros, but never
directly.
- Rename log_info_object() to log_object_info(), simply because the
object should be before any other parameters, to follow OO-style
programming style.
Diffstat (limited to 'src/network/networkd.h')
-rw-r--r-- | src/network/networkd.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/network/networkd.h b/src/network/networkd.h index 9acf31cd1d..263cc61eef 100644 --- a/src/network/networkd.h +++ b/src/network/networkd.h @@ -336,14 +336,14 @@ int address_pool_acquire(AddressPool *p, unsigned prefixlen, union in_addr_union /* Macros which append INTERFACE= to the message */ -#define log_full_link(level, link, fmt, ...) log_meta_object(level, 0, __FILE__, __LINE__, __func__, "INTERFACE=", link->ifname, "%-*s: " fmt, IFNAMSIZ, link->ifname, ##__VA_ARGS__) -#define log_debug_link(link, ...) log_full_link(LOG_DEBUG, link, ##__VA_ARGS__) -#define log_info_link(link, ...) log_full_link(LOG_INFO, link, ##__VA_ARGS__) -#define log_notice_link(link, ...) log_full_link(LOG_NOTICE, link, ##__VA_ARGS__) -#define log_warning_link(link, ...) log_full_link(LOG_WARNING, link, ##__VA_ARGS__) -#define log_error_link(link, ...) log_full_link(LOG_ERR, link, ##__VA_ARGS__) - -#define log_struct_link(level, link, ...) log_struct(level, "INTERFACE=%s", link->ifname, __VA_ARGS__) +#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 ADDRESS_FMT_VAL(address) \ (address).s_addr & 0xFF, \ |