From: Michael Tremer Date: Mon, 11 May 2026 15:59:28 +0000 (+0000) Subject: main: Enable debug logging only when requested X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86e48be18db31adcd406e3c1b07c25f06b1aa4ec;p=zone-sync.git main: Enable debug logging only when requested Signed-off-by: Michael Tremer --- 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 = {