chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d2c7646
)
tree-wide: add DEBUG_LOGGING macro that checks whether debug logging is on (#7645)
author
Lennart Poettering
<lennart@poettering.net>
Fri, 15 Dec 2017 10:09:00 +0000
(11:09 +0100)
committer
Sven Eden
<yamakuzure@gmx.net>
Wed, 30 May 2018 05:49:37 +0000
(07:49 +0200)
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.
src/basic/log.h
patch
|
blob
|
history
diff --git
a/src/basic/log.h
b/src/basic/log.h
index 78b097f0fce257dcb77b71ceef48fd261d073279..297bb92b99c03567930adf4a33b54368e540f0ea 100644
(file)
--- a/
src/basic/log.h
+++ b/
src/basic/log.h
@@
-344,3
+344,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)