]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/log.h
tree-wide: add DEBUG_LOGGING macro that checks whether debug logging is on (#7645)
[thirdparty/systemd.git] / src / basic / log.h
index e2608b2a9295abd0449b4be277b39921d22f0453..28300312f628586f2a520ee6befdd6fa9c2d3d65 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
 #pragma once
 
 /***
@@ -334,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)