devices: log the device context

This commit is contained in:
Lubomir Rintel 2017-03-02 21:17:22 +01:00
parent ed552c732c
commit a30f327b74

View file

@ -34,7 +34,9 @@ _nm_device_log_self_to_device (t *self) \
#undef _NMLOG_ENABLED
#define _NMLOG_ENABLED(level, domain) ( nm_logging_enabled ((level), (domain)) )
#define _NMLOG(level, domain, ...) \
nm_log_obj ((level), (domain), NULL, NULL, (self), "device", \
nm_log_obj ((level), (domain), \
(self) ? nm_device_get_iface (_nm_device_log_self_to_device (self)) : NULL, \
NULL, (self), "device", \
"(%s): " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \
(self) ? (nm_device_get_iface (_nm_device_log_self_to_device (self)) ?: "(null)") : "(none)" \
_NM_UTILS_MACRO_REST(__VA_ARGS__))