]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Update structured logging for exceptions to be in line with rest of code
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 27 Jun 2022 09:16:44 +0000 (11:16 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 27 Jun 2022 09:16:44 +0000 (11:16 +0200)
pdns/recursordist/rec-zonetocache.cc

index 8f6e924e37e26ccf14ccce66ff3f76cecd66f146..07374eef55b5be4c36bbbb773c5be07c88b1c400 100644 (file)
@@ -462,13 +462,13 @@ void RecZoneToCache::ZoneToCache(const RecZoneToCache::Config& config, RecZoneTo
     log->info("Loaded zone into cache", "refresh", Logging::Loggable(state.d_waittime));
   }
   catch (const PDNSException& e) {
-    log->info("Unable to load zone into cache, will retry", "exception", Logging::Loggable(e.reason), "refresh", Logging::Loggable(state.d_waittime));
+    log->error(Logr::Error, e.reason, "Unable to load zone into cache, will retry", "exception", Logging::Loggable("PDNSException"), "refresh", Logging::Loggable(state.d_waittime));
   }
   catch (const std::runtime_error& e) {
-    log->info("Unable to load zone into cache, will retry", "exception", Logging::Loggable(e.what()), "refresh", Logging::Loggable(state.d_waittime));
+    log->error(Logr::Error, e.what(), "Unable to load zone into cache, will retry", "exception", Logging::Loggable("std::runtime_error"), "refresh", Logging::Loggable(state.d_waittime));
   }
   catch (...) {
-    log->info("Unable to load zone into cache, will retry", "exception", Logging::Loggable("unknown"), "refresh", Logging::Loggable(state.d_waittime));
+    log->info("Unable to load zone into cache, will retry", "refresh", Logging::Loggable(state.d_waittime));
   }
   state.d_lastrun = time(nullptr);
   return;