summaryrefslogtreecommitdiffstats
path: root/src/resolve
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/resolve
parentMerge pull request #7637 from yuwata/transient-path (diff)
downloadsystemd-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 'src/resolve')
-rw-r--r--src/resolve/resolved-dns-cache.c2
-rw-r--r--src/resolve/resolved-manager.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/resolve/resolved-dns-cache.c b/src/resolve/resolved-dns-cache.c
index 942956dd71..e9197f1dfd 100644
--- a/src/resolve/resolved-dns-cache.c
+++ b/src/resolve/resolved-dns-cache.c
@@ -476,7 +476,7 @@ static int dns_cache_put_positive(
if (r < 0)
return r;
- if (log_get_max_level() >= LOG_DEBUG) {
+ if (DEBUG_LOGGING) {
_cleanup_free_ char *t = NULL;
(void) in_addr_to_string(i->owner_family, &i->owner_address, &t);
diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c
index 2dbf432df9..1311f04f75 100644
--- a/src/resolve/resolved-manager.c
+++ b/src/resolve/resolved-manager.c
@@ -1410,7 +1410,7 @@ void manager_dnssec_verdict(Manager *m, DnssecVerdict verdict, const DnsResource
assert(verdict >= 0);
assert(verdict < _DNSSEC_VERDICT_MAX);
- if (log_get_max_level() >= LOG_DEBUG) {
+ if (DEBUG_LOGGING) {
char s[DNS_RESOURCE_KEY_STRING_MAX];
log_debug("Found verdict for lookup %s: %s",