diff options
author | Vladimír Čunát <vladimir.cunat@nic.cz> | 2024-10-01 15:08:13 +0200 |
---|---|---|
committer | Vladimír Čunát <vladimir.cunat@nic.cz> | 2024-10-01 15:09:08 +0200 |
commit | 5e503ffd61eff1067d58f0b25f1e48dcddf9a0a2 (patch) | |
tree | 2c2ebc908073aa8165e18b4c521bad25385690ed | |
parent | fixup! Merge branch 'master' into rrl-wip (diff) | |
download | knot-resolver-5e503ffd61eff1067d58f0b25f1e48dcddf9a0a2.tar.xz knot-resolver-5e503ffd61eff1067d58f0b25f1e48dcddf9a0a2.zip |
lib/log: add [defer ] group
In particular this turns off those debug logs by default.
-rw-r--r-- | daemon/defer.c | 3 | ||||
-rw-r--r-- | lib/log.c | 1 | ||||
-rw-r--r-- | lib/log.h | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/daemon/defer.c b/daemon/defer.c index 1908f478..1ff523e3 100644 --- a/daemon/defer.c +++ b/daemon/defer.c @@ -29,8 +29,7 @@ #define IDLE_TIMEOUT 1000000 // ns (THREAD_CPUTIME); if exceeded, continue processing after next poll phase #define MAX_WAITING_REQS 10000 // if exceeded, process single deferred request immediatelly in poll phase -#define VERBOSE_LOG(...) kr_log_notice(DEVEL, "defer | " __VA_ARGS__) -//#define VERBOSE_LOG(...) +#define VERBOSE_LOG(...) kr_log_debug(DEFER, " | " __VA_ARGS__) struct defer { size_t capacity; @@ -80,6 +80,7 @@ const log_group_names_t log_group_names[] = { GRP_NAME_ITEM(LOG_GRP_EDE), GRP_NAME_ITEM(LOG_GRP_RULES), GRP_NAME_ITEM(LOG_GRP_PROTOLAYER), + GRP_NAME_ITEM(LOG_GRP_DEFER), GRP_NAME_ITEM(LOG_GRP_REQDBG), { NULL, LOG_GRP_UNKNOWN }, }; @@ -81,6 +81,7 @@ enum kr_log_group { LOG_GRP_EDE, LOG_GRP_RULES, LOG_GRP_PROTOLAYER, + LOG_GRP_DEFER, /* ^^ Add new log groups above ^^. */ LOG_GRP_REQDBG, /* Must be first non-displayed entry in enum! */ }; @@ -135,6 +136,7 @@ enum kr_log_group { #define LOG_GRP_EDE_TAG "exterr" /**< ``exterr``: extended error module */ #define LOG_GRP_RULES_TAG "rules" /**< ``rules``: new policy rules (their processing) */ #define LOG_GRP_PROTOLAYER_TAG "prlayr" /**< ``prlayr``: protocol layer system (session2) */ +#define LOG_GRP_DEFER_TAG "defer" /**< ``defer``: prioritization of requests */ #define LOG_GRP_REQDBG_TAG "reqdbg" /**< ``reqdbg``: debug logs enabled by policy actions */ ///@} |