From: Miod Vallat Date: Wed, 13 May 2026 07:56:55 +0000 (+0200) Subject: auth: allow the zone cache to get a structured logger X-Git-Tag: auth-5.1.0~17^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=120eaf922dd3c3bbac1f3511ac0673b95ca30fde;p=thirdparty%2Fpdns.git auth: allow the zone cache to get a structured logger Signed-off-by: Miod Vallat --- diff --git a/pdns/auth-main.cc b/pdns/auth-main.cc index c5e59f934d..5161f157a1 100644 --- a/pdns/auth-main.cc +++ b/pdns/auth-main.cc @@ -969,6 +969,7 @@ static void mainthread() UeberBackend::go(); // Setup the zone cache + g_zoneCache.setSLog(slog); g_zoneCache.setRefreshInterval(::arg().asNum("zone-cache-refresh-interval")); try { UeberBackend B; diff --git a/pdns/auth-zonecache.hh b/pdns/auth-zonecache.hh index ec7babf895..a36c888d15 100644 --- a/pdns/auth-zonecache.hh +++ b/pdns/auth-zonecache.hh @@ -78,6 +78,11 @@ public: void clear(); + void setSLog(Logr::log_t log) + { + d_log = log; + } + private: SharedLockGuarded> d_nets; SharedLockGuarded d_views; @@ -121,6 +126,8 @@ private: bool d_replacePending{false}; }; LockGuarded d_pending; + + std::shared_ptr d_log; }; extern AuthZoneCache g_zoneCache;