From: Otto Moerbeek Date: Mon, 27 Jun 2022 09:16:44 +0000 (+0200) Subject: Update structured logging for exceptions to be in line with rest of code X-Git-Tag: auth-4.8.0-alpha0~29^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c85af1d0f0b560d1ed4150ba6d56b06eb290c913;p=thirdparty%2Fpdns.git Update structured logging for exceptions to be in line with rest of code --- 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;