if (res == 0) {
// Success, go back to the defaut period
rootUpdateTask.setPeriod(std::max(SyncRes::s_maxcachettl * 8 / 10, minRootRefreshInterval));
+ const string msg = "Exception while priming the root NS zones";
try {
primeRootNSZones(g_dnssecmode, 0);
}
catch (const std::exception& e) {
SLOG(g_log << Logger::Error << "Exception while priming the root NS zones: " << e.what() << endl,
- log->error(Logr::Error, e.what(), "Exception while priming the root NS zones"));
+ log->error(Logr::Error, e.what(), msg, "exception", Logging::Loggable("std::exception")));
}
catch (const PDNSException& e) {
SLOG(g_log << Logger::Error << "Exception while priming the root NS zones: " << e.reason << endl,
- log->error(Logr::Error, e.reason, "Exception while priming the root NS zones"));
+ log->error(Logr::Error, e.reason, msg, "exception", Logging::Loggable("PDNSException")));
}
catch (const ImmediateServFailException& e) {
SLOG(g_log << Logger::Error << "Exception while priming the root NS zones: " << e.reason << endl,
- log->error(Logr::Error, e.reason, "Exception while priming the root NS zones"));
+ log->error(Logr::Error, e.reason, msg, "exception", Logging::Loggable("ImmediateServFailException")));
}
catch (const PolicyHitException& e) {
SLOG(g_log << Logger::Error << "Policy hit while priming the root NS zones" << endl,
- log->info(Logr::Error, "Policy hit while priming the root NS zones"));
+ log->info(Logr::Error, msg, "exception", Logging::Loggable("PolicyHitException")));
}
catch (...) {
SLOG(g_log << Logger::Error << "Exception while priming the root NS zones" << endl,
}
int res = -1;
- const std::string msg = "Failed to resolve";
+ const std::string msg = "Exception while resolving";
try {
res = sr.beginResolve(qname, qtype, qclass, ret, 0);
}
}
catch(const PolicyHitException& e) {
SLOG(g_log<<Logger::Error<<"Failed to resolve "<<qname<<", got a policy hit"<<endl,
- log->error(Logr::Error, "Policy Hit", msg, "exception", Logging::Loggable("PolicyHitException")));
+ log->info(Logr::Error, msg, "exception", Logging::Loggable("PolicyHitException")));
ret.clear();
}
catch(const std::exception& e) {
}
catch(...) {
SLOG(g_log<<Logger::Error<<"Failed to resolve "<<qname<<", got an exception"<<endl,
- log->error(Logr::Error, "Exception", msg));
+ log->info(Logr::Error, msg));
ret.clear();
}