From 77d23f796774fbf7a718caf6fde0efff687c68d0 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Fri, 3 Jun 2022 13:38:32 +0200 Subject: [PATCH] Tweaks to make exception reporting more uniform --- pdns/rpzloader.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pdns/rpzloader.cc b/pdns/rpzloader.cc index 217cec0641..52a0386db9 100644 --- a/pdns/rpzloader.cc +++ b/pdns/rpzloader.cc @@ -426,12 +426,12 @@ void RPZIXFRTracker(const std::vector& primaries, const boost::opt } catch(const std::exception& e) { SLOG(g_log<info(Logr::Warning, "Unable to load RPZ zone, will retry", "from", Logging::Loggable(primary), "exception", Logging::Loggable(e.what()), "refresh", Logging::Loggable(refresh))); + logger->error(Logr::Warning, e.what(), "Unable to load RPZ zone, will retry", "from", Logging::Loggable(primary), "exception", Logging::Loggable("std::exception"), "refresh", Logging::Loggable(refresh))); incRPZFailedTransfers(polName); } catch(const PDNSException& e) { SLOG(g_log<info(Logr::Warning, "Unable to load RPZ zone, will retry", "from", Logging::Loggable(primary), "exception", Logging::Loggable(e.reason), "refresh", Logging::Loggable(refresh))); + logger->error(Logr::Warning, e.reason, "Unable to load RPZ zone, will retry", "from", Logging::Loggable(primary), "exception", Logging::Loggable("PDNSException"), "refresh", Logging::Loggable(refresh))); incRPZFailedTransfers(polName); } } @@ -482,7 +482,7 @@ void RPZIXFRTracker(const std::vector& primaries, const boost::opt break; } catch(const std::runtime_error& e ){ SLOG(g_log<error(Logr::Warning, e.what(), "Exception during retrieval of delta")); + logger->error(Logr::Warning, e.what(), "Exception during retrieval of delta", "exception", Logging::Loggable("std::runtime_error"))); incRPZFailedTransfers(polName); continue; } @@ -597,7 +597,7 @@ void RPZIXFRTracker(const std::vector& primaries, const boost::opt } catch (const std::exception& e) { SLOG(g_log << Logger::Error << "Error while applying the update received over XFR for "<error(Logr::Error, e.what(), "Exception while applying the update received over XFR, skipping")); + logger->error(Logr::Error, e.what(), "Exception while applying the update received over XFR, skipping", "exception", Logging::Loggable("std::exception"))); } } } -- 2.47.2