diff options
author | Thomas Haller <thaller@redhat.com> | 2015-11-06 12:58:55 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-11-06 14:16:41 +0100 |
commit | 95878673495474eb4d4190fdb6f2a17bafd212d0 (patch) | |
tree | 51abd19f610a9d1b4528b1baa5c483dc31c5e732 /src/nm-logging.h | |
parent | b9da3d93207e46de895fd07cfe9de1edfa79efef (diff) | |
download | NetworkManager-95878673495474eb4d4190fdb6f2a17bafd212d0.tar.gz |
logging: swap names of logging macros _LOGT() and _LOGt()
Previsously, _LOGT() could be disabled at compile time. Thus it
was different then the other macros _LOGD(), _LOGI(), etc.
OTOH, _LOGt() was the macro that always was compiled in.
Swap the name of the macros. Now the upper-case macros are always
enabled, while the lower-case macro _LOGt() is enabled depending
on compile configuration.
Diffstat (limited to 'src/nm-logging.h')
-rw-r--r-- | src/nm-logging.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nm-logging.h b/src/nm-logging.h index b54078186e..19b965f8f3 100644 --- a/src/nm-logging.h +++ b/src/nm-logging.h @@ -177,27 +177,27 @@ void nm_logging_syslog_openlog (const char *logging_backend); * might want to undef this and redefine it. */ #define _NMLOG_ENABLED(level) ( nm_logging_enabled ((level), (_NMLOG_DOMAIN)) ) -#define _LOGt(...) _NMLOG (LOGL_TRACE, __VA_ARGS__) +#define _LOGT(...) _NMLOG (LOGL_TRACE, __VA_ARGS__) #define _LOGD(...) _NMLOG (LOGL_DEBUG, __VA_ARGS__) #define _LOGI(...) _NMLOG (LOGL_INFO , __VA_ARGS__) #define _LOGW(...) _NMLOG (LOGL_WARN , __VA_ARGS__) #define _LOGE(...) _NMLOG (LOGL_ERR , __VA_ARGS__) -#define _LOGt_ENABLED(...) _NMLOG_ENABLED (LOGL_TRACE, ##__VA_ARGS__) +#define _LOGT_ENABLED(...) _NMLOG_ENABLED (LOGL_TRACE, ##__VA_ARGS__) #define _LOGD_ENABLED(...) _NMLOG_ENABLED (LOGL_DEBUG, ##__VA_ARGS__) #define _LOGI_ENABLED(...) _NMLOG_ENABLED (LOGL_INFO , ##__VA_ARGS__) #define _LOGW_ENABLED(...) _NMLOG_ENABLED (LOGL_WARN , ##__VA_ARGS__) #define _LOGE_ENABLED(...) _NMLOG_ENABLED (LOGL_ERR , ##__VA_ARGS__) -/* _LOGt() and _LOGT() both log with level TRACE, but the latter is disabled by default, +/* _LOGT() and _LOGt() both log with level TRACE, but the latter is disabled by default, * unless building with --with-more-logging. */ #ifdef NM_MORE_LOGGING -#define _LOGT_ENABLED(...) _NMLOG_ENABLED (LOGL_TRACE, ##__VA_ARGS__) -#define _LOGT(...) _NMLOG (LOGL_TRACE, __VA_ARGS__) +#define _LOGt_ENABLED(...) _NMLOG_ENABLED (LOGL_TRACE, ##__VA_ARGS__) +#define _LOGt(...) _NMLOG (LOGL_TRACE, __VA_ARGS__) #else /* still call the logging macros to get compile time checks, but they will be optimized out. */ -#define _LOGT_ENABLED(...) ( FALSE && (_NMLOG_ENABLED (LOGL_TRACE, ##__VA_ARGS__)) ) -#define _LOGT(...) G_STMT_START { if (FALSE) { _NMLOG (LOGL_TRACE, __VA_ARGS__); } } G_STMT_END +#define _LOGt_ENABLED(...) ( FALSE && (_NMLOG_ENABLED (LOGL_TRACE, ##__VA_ARGS__)) ) +#define _LOGt(...) G_STMT_START { if (FALSE) { _NMLOG (LOGL_TRACE, __VA_ARGS__); } } G_STMT_END #endif /*****************************************************************************/ |