From 517c30e30bacc15c92582405c2c3a3f045083179 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 21 Oct 2019 13:45:40 +0100 Subject: Improve the core_hostname_lookup result log message. - Add the type of request. - Add whether the request was cached. --- src/coremods/core_hostname_lookup.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/coremods/core_hostname_lookup.cpp b/src/coremods/core_hostname_lookup.cpp index 31f5edd8c..125fe07f0 100644 --- a/src/coremods/core_hostname_lookup.cpp +++ b/src/coremods/core_hostname_lookup.cpp @@ -67,7 +67,10 @@ class UserResolver : public DNS::Request return; } - ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "DNS result for %s: '%s' -> '%s'", uuid.c_str(), ans_record->name.c_str(), ans_record->rdata.c_str()); + ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "DNS %s result for %s: '%s' -> '%s'%s", + this->manager->GetTypeStr(question.type).c_str(), uuid.c_str(), + ans_record->name.c_str(), ans_record->rdata.c_str(), + r->cached ? " (cached)" : ""); if (this->question.type == DNS::QUERY_PTR) { -- cgit v1.2.3