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:
committed by
Zbigniew Jędrzejewski-Szmek
parent
42521cd1ed
commit
f1d34068ef
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user