]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
fixup! log: lua logging
authorVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 14 Jul 2021 15:57:34 +0000 (17:57 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 14 Jul 2021 16:06:14 +0000 (18:06 +0200)
daemon/lua/trust_anchors.lua.in
modules/daf/daf.lua
modules/rebinding/rebinding.lua
modules/serve_stale/serve_stale.lua
modules/ta_update/ta_update.lua

index 8eef361f77e897b3fb493f8b957a7c976afb7830..662048dd25c563d16961de45a8659ee7a2184eac 100644 (file)
@@ -360,7 +360,7 @@ local function add_file(path, unmanaged)
        trust_anchors.keysets[owner] = keyset
 
        -- Replace the TA store used for validation
-       if keyset_publish(keyset) and verbose() then
+       if keyset_publish(keyset) then
                log_info(ffi.C.LOG_GRP_TA, 'installed trust anchors for domain ' .. owner_str .. ' are:\n'
                        .. trust_anchors.summary(owner))
        end
index 5b257b5eb2fb808f5d3b06c7c7603a9d99cf3bc2..c3b089bf8e7b979fba2d9cd89f716ec343b30d7a 100644 (file)
@@ -358,9 +358,8 @@ end
 -- @function Configure module
 function M.config()
        if not http then
-               if verbose() then
-                       log_error(ffi.C.LOG_GRP_DAF, 'HTTP API unavailable because HTTP module is not loaded, use modules.load("http")')
-               end
+               log_warn(ffi.C.LOG_GRP_DAF,
+                       'HTTP API unavailable because HTTP module is not loaded, use modules.load("http")')
                return
        end
        local endpoints = http.configs._builtin.webmgmt.endpoints
index e5da9fb6216b6b3309df115eb6764020c8134a84..d5d6e741f11f050be4299eadf16f21c15b97dffa 100644 (file)
@@ -107,10 +107,8 @@ function M.layer.consume(state, req, pkt)
        if qry.parent == nil then
                state = refuse(req)
        end
-       if verbose() then
-               log_qry(qry, ffi.C.LOG_GRP_REBIND,
-                   'blocking blacklisted IP in RR \'%s\'\n', kres.rr2str(bad_rr))
-       end
+       log_qry(qry, ffi.C.LOG_GRP_REBIND,
+               'blocking blacklisted IP in RR \'%s\'\n', kres.rr2str(bad_rr))
        return state
 end
 
index a006fb3cb473ae471c706501954cae4c6cf7c70b..faf07fbe05a06f7c5bafee9940339de52a27125b 100644 (file)
@@ -27,7 +27,7 @@ M.layer = {
                local now = ffi.C.kr_now()
                local deadline = qry.creation_time_mono + M.timeout
                if now > deadline or qry.flags.NO_NS_FOUND then
-                       log_info(ffi.C.LOG_GRP_SRVSTALE, '   => no reachable NS, using stale data')
+                       log_debug(ffi.C.LOG_GRP_SRVSTALE, '   => no reachable NS, using stale data')
                        qry.stale_cb = M.callback
                        -- TODO: probably start the same request that doesn't stale-serve,
                        -- but first we need some detection of non-interactive / internal requests.
index f840fe657fac02b9d2afd0170275bab0873c4255..b0a8520ee48456f85ceb72535d9ca4a118358ae3 100644 (file)
@@ -95,7 +95,7 @@ local function ta_present(keyset, rr, hold_down_time)
                        ta.state = key_state.Valid
                        ta.timer = nil
                end
-               if rr.state ~= key_state.Valid or verbose() then
+               if rr.state ~= key_state.Valid then
                        log_info(ffi.C.LOG_GRP_TAUPDATE, 'key: ' .. key_tag .. ' state: '..ta.state)
                end
                return true