From 86e48be18db31adcd406e3c1b07c25f06b1aa4ec Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 11 May 2026 15:59:28 +0000 Subject: [PATCH] main: Enable debug logging only when requested Signed-off-by: Michael Tremer --- main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 22d11d2..784cebd 100644 --- a/main.c +++ b/main.c @@ -93,6 +93,7 @@ typedef struct ctx { // Create the context static ctx_t ctx = { + .log_level = LOG_INFO, .path = DEFAULT_PATH, .transport = DNS_TRANSPORT_NONE, .port = 53, @@ -146,7 +147,8 @@ static void setup_logging(void) { isc_log_create(ctx.memctx, &ctx.log, &logcfg); /* Crank up debug verbosity */ - isc_log_setdebuglevel(ctx.log, 99); + if (ctx.log_level == LOG_DEBUG) + isc_log_setdebuglevel(ctx.log, 99); /* Define a channel that writes everything to stderr */ isc_logdestination_t dest = { -- 2.47.3