From fae9c05fccc5670989a112b52334056a2158b2e0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0pa=C4=8Dek?= Date: Fri, 20 Apr 2018 16:50:24 +0200 Subject: [PATCH] serve_stale: log only in verbose mode --- modules/serve_stale/serve_stale.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/serve_stale/serve_stale.lua b/modules/serve_stale/serve_stale.lua index dfe20a1ad..cf19be173 100644 --- a/modules/serve_stale/serve_stale.lua +++ b/modules/serve_stale/serve_stale.lua @@ -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. -- 2.47.2