]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
serve_stale: log only in verbose mode
authorPetr Špaček <petr.spacek@nic.cz>
Fri, 20 Apr 2018 14:50:24 +0000 (16:50 +0200)
committerPetr Špaček <petr.spacek@nic.cz>
Fri, 20 Apr 2018 15:17:59 +0000 (17:17 +0200)
modules/serve_stale/serve_stale.lua

index dfe20a1ad15d3f429050319d5fe16846cdb1ff88..cf19be1731155fe9182b2a091cf2db85a9b289a8 100644 (file)
@@ -27,7 +27,9 @@ 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('[     ][stal]   => no reachable NS, using stale data')
+                       if verbose() then
+                               log('[     ][stal]   => no reachable NS, using stale data')
+                       end
                        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.