diff options
author | Thomas Haller <thaller@redhat.com> | 2014-07-23 14:11:30 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-08-01 19:06:25 +0200 |
commit | 60cf1b8fcdc7c61a15738ddf59a4e27dfa1b5104 (patch) | |
tree | f0bd6852701e82c404c52dabaea5ccfe382b4c63 /src/nm-logging.h | |
parent | 19d4bda69ae135d400b8778c47db8f60b11d24a0 (diff) | |
download | NetworkManager-60cf1b8fcdc7c61a15738ddf59a4e27dfa1b5104.tar.gz |
core/logging: define logging macros based on nm_log()
Base the definition of nm_log_*() macros on the nm_log() macro,
instead of directly on the _nm_log() function.
Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'src/nm-logging.h')
-rw-r--r-- | src/nm-logging.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/nm-logging.h b/src/nm-logging.h index 19a82f1b6a..71ae39b003 100644 --- a/src/nm-logging.h +++ b/src/nm-logging.h @@ -92,20 +92,13 @@ typedef enum { GQuark nm_logging_error_quark (void); -#define nm_log_err(domain, ...) \ - _nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_ERR, ## __VA_ARGS__ ) - -#define nm_log_warn(domain, ...) \ - _nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_WARN, ## __VA_ARGS__ ) - -#define nm_log_info(domain, ...) \ - _nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_INFO, ## __VA_ARGS__ ) - -#define nm_log_dbg(domain, ...) \ - _nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_DEBUG, ## __VA_ARGS__ ) +#define nm_log_err(domain, ...) nm_log ((domain), LOGL_ERR, __VA_ARGS__) +#define nm_log_warn(domain, ...) nm_log ((domain), LOGL_WARN, __VA_ARGS__) +#define nm_log_info(domain, ...) nm_log ((domain), LOGL_INFO, __VA_ARGS__) +#define nm_log_dbg(domain, ...) nm_log ((domain), LOGL_DEBUG, __VA_ARGS__) #define nm_log(domain, level, ...) \ - _nm_log (G_STRLOC, G_STRFUNC, domain, level, ## __VA_ARGS__ ) + _nm_log (G_STRLOC, G_STRFUNC, domain, level, __VA_ARGS__) void _nm_log (const char *loc, const char *func, |