diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-12-15 11:09:00 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-12-15 11:09:00 +0100 |
commit | f1d34068ef8d657238235d04ea291ee1ca095129 (patch) | |
tree | 18d734892f170e299b74734ec2005831522916ed /coccinelle/debug-logging.cocci | |
parent | Merge pull request #7637 from yuwata/transient-path (diff) | |
download | systemd-f1d34068ef8d657238235d04ea291ee1ca095129.tar.xz systemd-f1d34068ef8d657238235d04ea291ee1ca095129.zip |
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 'coccinelle/debug-logging.cocci')
-rw-r--r-- | coccinelle/debug-logging.cocci | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/coccinelle/debug-logging.cocci b/coccinelle/debug-logging.cocci new file mode 100644 index 0000000000..9084cf773b --- /dev/null +++ b/coccinelle/debug-logging.cocci @@ -0,0 +1,8 @@ +@@ +@@ +- _unlikely_(log_get_max_level() >= LOG_DEBUG) ++ DEBUG_LOGGING +@@ +@@ +- log_get_max_level() >= LOG_DEBUG ++ DEBUG_LOGGING |