From: Tomas Krizek Date: Fri, 22 Oct 2021 13:26:42 +0000 (+0200) Subject: Dockerfile: polish request tracing in debug_mode X-Git-Tag: v5.4.3~15^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc2fd7d2842cb3dea1d0b266efda3bebfa207eff;p=thirdparty%2Fknot-resolver.git 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. --- 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