summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukáš Ježek <lukas.jezek@nic.cz>2021-07-02 09:32:51 +0200
committerTomas Krizek <tomas.krizek@nic.cz>2021-07-29 11:40:50 +0200
commit75adaa65188551dac3bd36ce9c379f56fffdd9cf (patch)
tree51979d03ab31de9ef5fbb79f950055efa87313df /lib
parentlog: lua logging (diff)
downloadknot-resolver-75adaa65188551dac3bd36ce9c379f56fffdd9cf.tar.xz
knot-resolver-75adaa65188551dac3bd36ce9c379f56fffdd9cf.zip
log: fix CI tests
Diffstat (limited to 'lib')
-rw-r--r--lib/layer/test.integr/kresd_config.j24
-rw-r--r--lib/log.c1
-rw-r--r--lib/log.h2
3 files changed, 6 insertions, 1 deletions
diff --git a/lib/layer/test.integr/kresd_config.j2 b/lib/layer/test.integr/kresd_config.j2
index 57db6e1b..57c8542e 100644
--- a/lib/layer/test.integr/kresd_config.j2
+++ b/lib/layer/test.integr/kresd_config.j2
@@ -1,11 +1,13 @@
-- SPDX-License-Identifier: GPL-3.0-or-later
+local ffi = require('ffi')
+
-- hook for iter_refuse_toomany.rpl
local function check_max_number_of_upstream_queries(maxcnt)
return function (state, req)
local vals = worker.stats()
local upstream_packets = vals.ipv4 + vals.ipv6
- log('%d packets sent to upstream', upstream_packets)
+ log_info(ffi.C.LOG_GRP_TESTS, '%d packets sent to upstream', upstream_packets)
local answ_f
if upstream_packets > maxcnt then -- . + com. + ????
answ_f = policy.ANSWER(
diff --git a/lib/log.c b/lib/log.c
index d1537b70..702dfd34 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -60,6 +60,7 @@ log_group_names_t log_group_names[] = {
GRP_NAME_ITEM(LOG_GRP_PRIMING),
GRP_NAME_ITEM(LOG_GRP_SRVSTALE),
GRP_NAME_ITEM(LOG_GRP_WATCHDOG),
+ GRP_NAME_ITEM(LOG_GRP_TESTS),
{ NULL, -1 },
};
diff --git a/lib/log.h b/lib/log.h
index e1d8b911..c43f53f3 100644
--- a/lib/log.h
+++ b/lib/log.h
@@ -66,6 +66,7 @@ enum kr_log_groups_type {
LOG_GRP_PRIMING,
LOG_GRP_SRVSTALE,
LOG_GRP_WATCHDOG,
+ LOG_GRP_TESTS,
};
@@ -105,6 +106,7 @@ enum kr_log_groups_type {
#define LOG_GRP_PRIMING_TAG "primin"
#define LOG_GRP_SRVSTALE_TAG "srvstl"
#define LOG_GRP_WATCHDOG_TAG "wtchdg"
+#define LOG_GRP_TESTS_TAG "tests "
KR_EXPORT
extern log_groups_t kr_log_groups;