From: Otto Moerbeek Date: Wed, 15 Jun 2022 06:57:52 +0000 (+0200) Subject: Structured logging for root refresh X-Git-Tag: auth-4.8.0-alpha0~50^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e82dc1932f794c4acc30c8a164db558bf63a40e3;p=thirdparty%2Fpdns.git Structured logging for root refresh --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 8fdc2bd26f..07fdafe868 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -5779,6 +5779,7 @@ int SyncRes::getRootNS(struct timeval now, asyncresolve_t asyncCallback, unsigne sr.setDNSSECValidationRequested(g_dnssecmode != DNSSECMode::Off && g_dnssecmode != DNSSECMode::ProcessNoValidate); sr.setAsyncCallback(asyncCallback); + const string msg = "Failed to update . records"; vector ret; int res = -1; try { @@ -5790,21 +5791,26 @@ int SyncRes::getRootNS(struct timeval now, asyncresolve_t asyncCallback, unsigne } } } - catch(const PDNSException& e) { - g_log<error(Logr::Error, e.reason, msg, "exception", Logging::Loggable("PDNSException"))); } - catch(const ImmediateServFailException& e) { - g_log<error(Logr::Error, e.reason, msg, "exception", Logging::Loggable("ImmediateServFailException"))); } - catch(const PolicyHitException& e) { - g_log<info(Logr::Error, msg, "exception", Logging::Loggable("PolicyHitException"))); ret.clear(); } - catch(const std::exception& e) { - g_log<error(Logr::Error, e.what(), msg, "exception", Logging::Loggable("std::exception"))); } - catch(...) { - g_log<info(Logr::Error, msg)); } if (res == 0) { @@ -5812,7 +5818,8 @@ int SyncRes::getRootNS(struct timeval now, asyncresolve_t asyncCallback, unsigne log->info(Logr::Debug, "Refreshed . records")); } else { - g_log<