From c85af1d0f0b560d1ed4150ba6d56b06eb290c913 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 27 Jun 2022 11:16:44 +0200 Subject: [PATCH] Update structured logging for exceptions to be in line with rest of code --- pdns/recursordist/rec-zonetocache.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pdns/recursordist/rec-zonetocache.cc b/pdns/recursordist/rec-zonetocache.cc index 8f6e924e37..07374eef55 100644 --- a/pdns/recursordist/rec-zonetocache.cc +++ b/pdns/recursordist/rec-zonetocache.cc @@ -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; -- 2.47.2