core: add NMLOG macros to nm-manager.c

This commit is contained in:
Thomas Haller 2016-01-18 14:04:56 +01:00
parent 4b917123ef
commit c8e7957c63

View file

@ -194,6 +194,25 @@ enum {
LAST_PROP
};
NM_DEFINE_SINGLETON_INSTANCE (NMManager);
/************************************************************************/
#define _NMLOG_DOMAIN LOGD_CORE
#define _NMLOG_PREFIX_NAME "manager"
#define _NMLOG(level, ...) \
G_STMT_START { \
char __sbuf[32]; \
const void *const __self = (self); \
\
nm_log ((level), _NMLOG_DOMAIN, \
"%s%s: " _NM_UTILS_MACRO_FIRST (__VA_ARGS__), \
_NMLOG_PREFIX_NAME, \
(__self && __self != singleton_instance \
? (__self ? nm_sprintf_buf (__sbuf, "[%p]", __self) : "[]") \
: "") \
_NM_UTILS_MACRO_REST (__VA_ARGS__)); \
} G_STMT_END
/************************************************************************/