diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2018-10-01 11:31:15 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2018-10-01 11:45:57 +0200 |
commit | 7ddff2ca8ae241b0925041d6cfcbd5fa5ce09108 (patch) | |
tree | 231fc8908d612b5aefb237090016a8da8f33471f | |
parent | 8e778b9ed1bd250ceaf613f10fa4a697fe1897a4 (diff) |
platform: bring back the interface name to log messages
-rw-r--r-- | src/platform/nm-platform.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index 87cff15f8..3b7967048 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -63,14 +63,17 @@ G_STATIC_ASSERT (G_STRUCT_OFFSET (NMPlatformIPRoute, network_ptr) == G_STRUCT_OF char __prefix[32]; \ const char *__p_prefix = _NMLOG_PREFIX_NAME; \ const NMPlatform *const __self = (self); \ + const char *__name = name; \ \ if (__self && NM_PLATFORM_GET_PRIVATE (__self)->log_with_ptr) { \ g_snprintf (__prefix, sizeof (__prefix), "%s[%p]", _NMLOG_PREFIX_NAME, __self); \ __p_prefix = __prefix; \ } \ - _nm_log (__level, _NMLOG_DOMAIN, 0, name, NULL, \ - "%s: " _NM_UTILS_MACRO_FIRST (__VA_ARGS__), \ - __p_prefix _NM_UTILS_MACRO_REST (__VA_ARGS__)); + _nm_log (__level, _NMLOG_DOMAIN, 0, __name, NULL, \ + "%s: %s%s%s" _NM_UTILS_MACRO_FIRST (__VA_ARGS__), \ + __p_prefix, \ + NM_PRINT_FMT_QUOTED (__name, "(", __name, ") ", "") \ + _NM_UTILS_MACRO_REST (__VA_ARGS__)); #define _NMLOG(level, ...) \ G_STMT_START { \ |