]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Apply structured logging configuration to the setup logger
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 30 Dec 2025 14:51:17 +0000 (15:51 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 19 Jan 2026 10:01:28 +0000 (11:01 +0100)
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
pdns/dnsdistdist/dnsdist.cc

index c74fd102eeeaba5912fd5fab2551c14d94700509..8cdbf55063e1fdde4dde2d38d07bb97b32159553 100644 (file)
@@ -3716,6 +3716,9 @@ int main(int argc, char** argv)
 #endif
       }
       // No exception was thrown
+      dnsdist::logging::setup(dnsdist::configuration::getImmutableConfiguration().d_loggingBackend);
+      setupLogger = dnsdist::logging::getTopLogger()->withName("setup");
+
       SLOG(infolog("Configuration '%s' OK!", cmdLine.config),
            setupLogger->info(Logr::Info, "Configuration OK", "path", Logging::Loggable(cmdLine.config)));
       doExitNicely();
@@ -3738,6 +3741,7 @@ int main(int argc, char** argv)
     }
 
     dnsdist::logging::setup(dnsdist::configuration::getImmutableConfiguration().d_loggingBackend);
+    setupLogger = dnsdist::logging::getTopLogger()->withName("setup");
 
     // we only want to update this value if it has not been set by either the Lua or YAML configuration,
     // and we need to stop touching this value once the backends' hashes have been computed, in setupPools()