From bc2fd7d2842cb3dea1d0b266efda3bebfa207eff Mon Sep 17 00:00:00 2001 From: Tomas Krizek Date: Fri, 22 Oct 2021 15:26:42 +0200 Subject: [PATCH] Dockerfile: polish request tracing in debug_mode Since v5.4.0, using both debug level log and request tracing duplicates lines in the log output. This makes the log more readable while hopefully keeping all the relevant information there. --- etc/config/config.docker | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/etc/config/config.docker b/etc/config/config.docker index 84246000a..0e581d0f0 100644 --- a/etc/config/config.docker +++ b/etc/config/config.docker @@ -61,10 +61,9 @@ function debug_mode(qname, qtype) -- execute query right after start up and exit when the query is finished event.after(0, function() - -- ultra verbose log - log_level('debug') + log_level('info') policy.add(policy.all(policy.DEBUG_ALWAYS)) - log_debug(ffi.C.LOG_GRP_RESOLVER, 'starting DNS query for %s %s', qname, kres.tostring.type[qtype]) + log_info(ffi.C.LOG_GRP_RESOLVER, 'starting DNS query for %s %s', qname, kres.tostring.type[qtype]) local starttime = cqueues.monotime() resolve({ name = qname, @@ -76,7 +75,7 @@ function debug_mode(qname, qtype) event.after(1, -- milisecond function() local endtime = cqueues.monotime() - log_debug(ffi.C.LOG_GRP_RESOLVER, '\nrequest finished in %f ms', (endtime - starttime) * 1000) + log_info(ffi.C.LOG_GRP_RESOLVER, 'request finished in %f ms', (endtime - starttime) * 1000) os.exit() end) end -- 2.47.3