From: Otto Moerbeek Date: Fri, 3 Jun 2022 11:38:32 +0000 (+0200) Subject: Tweaks to make exception reporting more uniform X-Git-Tag: auth-4.8.0-alpha0~69^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77d23f796774fbf7a718caf6fde0efff687c68d0;p=thirdparty%2Fpdns.git Tweaks to make exception reporting more uniform --- 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"))); } } }