summaryrefslogtreecommitdiff
path: root/src/basic/log.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-12-15 11:09:00 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-12-15 11:09:00 +0100
commitf1d34068ef8d657238235d04ea291ee1ca095129 (patch)
tree18d734892f170e299b74734ec2005831522916ed /src/basic/log.h
parent42521cd1ed053ce13260cc0c942c33ff79e7a5ae (diff)
downloadsystemd-f1d34068ef8d657238235d04ea291ee1ca095129.tar.gz
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.
Diffstat (limited to 'src/basic/log.h')
-rw-r--r--src/basic/log.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/log.h b/src/basic/log.h
index aa5976c3c0..28300312f6 100644
--- a/src/basic/log.h
+++ b/src/basic/log.h
@@ -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)