diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2017-10-12 13:50:40 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2017-10-26 20:23:02 +0200 |
commit | d88f2640526f76c9eeaa5af76e9c40a21844aac6 (patch) | |
tree | 2a71210e51a5341d4ca8aea63f33f03a24c80817 | |
parent | 37b71c490373c5af42b0590757e6e3ea1f6fc708 (diff) | |
download | NetworkManager-d88f2640526f76c9eeaa5af76e9c40a21844aac6.tar.gz |
device: log device type too
-rw-r--r-- | src/devices/nm-device-logging.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/devices/nm-device-logging.h b/src/devices/nm-device-logging.h index f0c7e59134..5f2e7d0da6 100644 --- a/src/devices/nm-device-logging.h +++ b/src/devices/nm-device-logging.h @@ -40,13 +40,16 @@ _nm_device_log_self_to_device (t *self) \ \ if (nm_logging_enabled (_level, _domain)) { \ typeof (*self) *const _self = (self); \ - const char *const _ifname = _nm_device_get_iface (_nm_device_log_self_to_device (_self)); \ + NMDevice *_device = _nm_device_log_self_to_device (_self); \ + const char *const _ifname = _nm_device_get_iface (_device); \ + const char *const _type_description = _ifname ? nm_device_get_type_description (_device) : NULL; \ \ nm_log_obj (_level, _domain, \ _ifname, NULL, \ _self, "device", \ - "%s%s%s: " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \ - NM_PRINT_FMT_QUOTED (_ifname, "(", _ifname, ")", "[null]") \ + "%s%s%s%s%s%s: " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \ + NM_PRINT_FMT_QUOTED (_ifname, "(", _ifname, "", "[null]"), \ + NM_PRINT_FMT_QUOTED (_ifname, ",", _type_description, ")", "") \ _NM_UTILS_MACRO_REST(__VA_ARGS__)); \ } \ } G_STMT_END |