diff options
author | Vladimír Čunát <vladimir.cunat@nic.cz> | 2022-06-16 10:15:31 +0200 |
---|---|---|
committer | Vladimír Čunát <vladimir.cunat@nic.cz> | 2022-06-27 10:01:02 +0200 |
commit | 857dc765d9cce85b8291a841e7fe700c40f93346 (patch) | |
tree | c88ef8cb663b5534f728389eb2205809aea27c4a | |
parent | modules/priming: don't warn against unloading it (diff) | |
download | knot-resolver-857dc765d9cce85b8291a841e7fe700c40f93346.tar.xz knot-resolver-857dc765d9cce85b8291a841e7fe700c40f93346.zip |
modules/priming: downgrade logs to 'info' level
When kresd starts without working internet connection, these would spam
logs by default every 10 seconds, which doesn't seem useful.
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | modules/priming/priming.lua | 6 |
2 files changed, 7 insertions, 3 deletions
@@ -1,6 +1,10 @@ Knot Resolver 5.5.2 (2022-mm-dd) ================================ +Improvements +------------ +- priming module: hide failures from the default log level (!1310) + Bugfixes -------- - daemon/http: improved URI checks to fix some proxies (#746, !1311) diff --git a/modules/priming/priming.lua b/modules/priming/priming.lua index eba02c04..624a9df4 100644 --- a/modules/priming/priming.lua +++ b/modules/priming/priming.lua @@ -44,7 +44,7 @@ end local function address_callback(pkt, req) if pkt == nil or pkt:rcode() ~= kres.rcode.NOERROR then pkt = req.qsource.packet - log_warn(ffi.C.LOG_GRP_PRIMING, "cannot resolve address '%s', type: %d", kres.dname2str(pkt:qname()), pkt:qtype()) + log_info(ffi.C.LOG_GRP_PRIMING, "cannot resolve address '%s', type: %d", kres.dname2str(pkt:qname()), pkt:qtype()) else local section = pkt:rrsets(kres.section.ANSWER) for i = 1, #section do @@ -64,7 +64,7 @@ local function address_callback(pkt, req) internal.to_resolve = internal.to_resolve - 1 if internal.to_resolve == 0 then if count_addresses(internal.nsset) == 0 then - log_warn(ffi.C.LOG_GRP_PRIMING, "cannot resolve any root server address, \ + log_info(ffi.C.LOG_GRP_PRIMING, "cannot resolve any root server address, \ next priming query in %d seconds", priming.retry_time / sec) internal.event = event.after(priming.retry_time, internal.prime) else @@ -81,7 +81,7 @@ end -- luacheck: no unused args local function priming_callback(pkt, req) if pkt == nil or pkt:rcode() ~= kres.rcode.NOERROR then - log_warn(ffi.C.LOG_GRP_PRIMING, "cannot resolve '.' NS, next priming query in %d seconds", priming.retry_time / sec) + log_info(ffi.C.LOG_GRP_PRIMING, "cannot resolve '.' NS, next priming query in %d seconds", priming.retry_time / sec) internal.event = event.after(priming.retry_time, internal.prime) return nil end |