tree-wide: add DEBUG_LOGGING macro that checks whether debug logging is on (#7645)

This makes things a bit easier to read I think, and also makes sure we
always use the _unlikely_ wrapper around it, which so far we used
sometimes and other times we didn't. Let's clean that up.
This commit is contained in:
Lennart Poettering
2017-12-15 11:09:00 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent 42521cd1ed
commit f1d34068ef
13 changed files with 21 additions and 11 deletions
+2
View File
@@ -335,3 +335,5 @@ int log_syntax_internal(
"String is not UTF-8 clean, ignoring assignment: %s", strna(_p)); \
} \
})
#define DEBUG_LOGGING _unlikely_(log_get_max_level() >= LOG_DEBUG)