]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Somewhat more info in housekeeping and directResolve 11662/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 31 May 2022 09:17:01 +0000 (11:17 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 31 May 2022 09:17:01 +0000 (11:17 +0200)
pdns/recursordist/rec-main.cc
pdns/syncres.cc

index e1b43a860dd2e1aae42fcc64c34daf1d104aa32b..0164e9893edea08344ea6a57c4793c04253956d6 100644 (file)
@@ -2057,24 +2057,25 @@ static void houseKeeping(void*)
         if (res == 0) {
           // Success, go back to the defaut period
           rootUpdateTask.setPeriod(std::max(SyncRes::s_maxcachettl * 8 / 10, minRootRefreshInterval));
+          const string msg = "Exception while priming the root NS zones";
           try {
             primeRootNSZones(g_dnssecmode, 0);
           }
           catch (const std::exception& e) {
             SLOG(g_log << Logger::Error << "Exception while priming the root NS zones: " << e.what() << endl,
-                 log->error(Logr::Error, e.what(), "Exception while priming the root NS zones"));
+                 log->error(Logr::Error, e.what(), msg, "exception", Logging::Loggable("std::exception")));
           }
           catch (const PDNSException& e) {
             SLOG(g_log << Logger::Error << "Exception while priming the root NS zones: " << e.reason << endl,
-                 log->error(Logr::Error, e.reason, "Exception while priming the root NS zones"));
+                 log->error(Logr::Error, e.reason, msg, "exception", Logging::Loggable("PDNSException")));
           }
           catch (const ImmediateServFailException& e) {
             SLOG(g_log << Logger::Error << "Exception while priming the root NS zones: " << e.reason << endl,
-                 log->error(Logr::Error, e.reason, "Exception while priming the root NS zones"));
+                 log->error(Logr::Error, e.reason, msg, "exception", Logging::Loggable("ImmediateServFailException")));
           }
           catch (const PolicyHitException& e) {
             SLOG(g_log << Logger::Error << "Policy hit while priming the root NS zones" << endl,
-                 log->info(Logr::Error, "Policy hit while priming the root NS zones"));
+                 log->info(Logr::Error, msg, "exception", Logging::Loggable("PolicyHitException")));
           }
           catch (...) {
             SLOG(g_log << Logger::Error << "Exception while priming the root NS zones" << endl,
index 19528bd5aaba9530f90021a52cbb5e1ce0225587..cc6b9b42667c9f2521885a1ffcf7864aa35a4307 100644 (file)
@@ -5645,7 +5645,7 @@ int directResolve(const DNSName& qname, const QType qtype, const QClass qclass,
   }
 
   int res = -1;
-  const std::string msg = "Failed to resolve";
+  const std::string msg = "Exception while resolving";
   try {
     res = sr.beginResolve(qname, qtype, qclass, ret, 0);
   }
@@ -5661,7 +5661,7 @@ int directResolve(const DNSName& qname, const QType qtype, const QClass qclass,
   }
   catch(const PolicyHitException& e) {
     SLOG(g_log<<Logger::Error<<"Failed to resolve "<<qname<<", got a policy hit"<<endl,
-         log->error(Logr::Error, "Policy Hit", msg, "exception", Logging::Loggable("PolicyHitException")));
+         log->info(Logr::Error, msg, "exception", Logging::Loggable("PolicyHitException")));
     ret.clear();
   }
   catch(const std::exception& e) {
@@ -5671,7 +5671,7 @@ int directResolve(const DNSName& qname, const QType qtype, const QClass qclass,
   }
   catch(...) {
     SLOG(g_log<<Logger::Error<<"Failed to resolve "<<qname<<", got an exception"<<endl,
-         log->error(Logr::Error, "Exception", msg));
+         log->info(Logr::Error, msg));
     ret.clear();
   }