From: Otto Moerbeek Date: Wed, 15 Jun 2022 12:38:36 +0000 (+0200) Subject: Move TCP processing to Structured logging X-Git-Tag: auth-4.8.0-alpha0~6^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab26d8d586ae87b4bf8d379be1a4c791eec4fa58;p=thirdparty%2Fpdns.git Move TCP processing to Structured logging --- diff --git a/pdns/logging.hh b/pdns/logging.hh index f4ed25c0d7..70de8dd965 100644 --- a/pdns/logging.hh +++ b/pdns/logging.hh @@ -78,6 +78,16 @@ struct is_toLogString_available : std::false_type template struct is_toLogString_available().toLogString())>> : std::true_type { +}; + + template +struct is_toString_available : std::false_type +{ +}; + +template +struct is_toString_available().toString())>> : std::true_type +{ }; template @@ -99,6 +109,9 @@ struct Loggable : public Logr::Loggable else if constexpr (is_toLogString_available::value) { return _t.toLogString(); } + else if constexpr (is_toString_available::value) { + return _t.toString(); + } else { std::ostringstream oss; oss << _t; diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index ad3b263049..bd1fbe5791 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -974,6 +974,12 @@ void startDoResolve(void* p) dq.meta = std::move(dc->d_meta); dq.fromAuthIP = &sr.d_fromAuthIP; + sr.d_slog = sr.d_slog->withValues("qname", Logging::Loggable(dc->d_mdp.d_qname), + "qtype", Logging::Loggable(QType(dc->d_mdp.d_qtype)), + "remote", Logging::Loggable(dc->getRemote()), + "proto", Logging::Loggable(dc->d_tcp ? "tcp" : "udp"), + "ecs", Logging::Loggable(dc->d_ednssubnet.source.empty() ? "" : dc->d_ednssubnet.source.toString()), + "mtid", Logging::Loggable(MT->getTid())); RunningResolveGuard tcpGuard(dc); if (ednsExtRCode != 0 || dc->d_mdp.d_header.opcode == Opcode::Notify) { @@ -993,12 +999,17 @@ void startDoResolve(void* p) } if (!g_quiet || tracedQuery) { - g_log << Logger::Warning << RecThreadInfo::id() << " [" << MT->getTid() << "/" << MT->numProcesses() << "] " << (dc->d_tcp ? "TCP " : "") << "question for '" << dc->d_mdp.d_qname << "|" + if (!g_slogStructured) { + g_log << Logger::Warning << RecThreadInfo::id() << " [" << MT->getTid() << "/" << MT->numProcesses() << "] " << (dc->d_tcp ? "TCP " : "") << "question for '" << dc->d_mdp.d_qname << "|" << QType(dc->d_mdp.d_qtype) << "' from " << dc->getRemote(); - if (!dc->d_ednssubnet.source.empty()) { - g_log << " (ecs " << dc->d_ednssubnet.source.toString() << ")"; + if (!dc->d_ednssubnet.source.empty()) { + g_log << " (ecs " << dc->d_ednssubnet.source.toString() << ")"; + } + g_log << endl; + } + else { + sr.d_slog->info(Logr::Info, "Question"); } - g_log << endl; } if (!dc->d_mdp.d_header.rd) { diff --git a/pdns/recursordist/rec-main.cc b/pdns/recursordist/rec-main.cc index 98b0271d7f..c9d3563d5c 100644 --- a/pdns/recursordist/rec-main.cc +++ b/pdns/recursordist/rec-main.cc @@ -99,6 +99,9 @@ char** g_argv; static string s_structured_logger_backend; static Logger::Urgency s_logUrgency; +std::shared_ptr g_logtcpin; +std::shared_ptr g_logudpin; + /* without reuseport, all listeners share the same sockets */ deferredAdd_t g_deferredAdds; @@ -2446,7 +2449,8 @@ static void recursorThread() for (expired_t::iterator i = expired.begin(); i != expired.end(); ++i) { shared_ptr conn = boost::any_cast>(i->second); if (g_logCommonErrors) - g_log << Logger::Warning << "Timeout from remote TCP client " << conn->d_remote.toStringWithPort() << endl; + SLOG(g_log << Logger::Warning << "Timeout from remote TCP client " << conn->d_remote.toStringWithPort() << endl, + g_logtcpin->info(Logr::Warning, "Timeout from remote TCP client", "remote", Logging::Loggable(conn->d_remote))); t_fdm->removeReadFD(i->first); } } @@ -2857,8 +2861,11 @@ int main(int argc, char** argv) if (g_slog == nullptr) { g_slog = Logging::Logger::create(loggerBackend); } + // Missing: a mechanism to call setVerbosity(x) auto startupLog = g_slog->withName("config"); + g_logtcpin = g_slog->withName("tcpin"); + g_logudpin = g_slog->withName("udpin"); ::arg().setSLog(startupLog); if (!::arg().file(configname.c_str())) { diff --git a/pdns/recursordist/rec-main.hh b/pdns/recursordist/rec-main.hh index 6ba4a92b2f..82d1ef905c 100644 --- a/pdns/recursordist/rec-main.hh +++ b/pdns/recursordist/rec-main.hh @@ -47,6 +47,9 @@ #include #endif +extern std::shared_ptr g_logtcpin; +extern std::shared_ptr g_logudpin; + //! used to send information to a newborn mthread struct DNSComboWriter { diff --git a/pdns/recursordist/rec-tcp.cc b/pdns/recursordist/rec-tcp.cc index d15fa64d13..efdcc683ee 100644 --- a/pdns/recursordist/rec-tcp.cc +++ b/pdns/recursordist/rec-tcp.cc @@ -60,10 +60,12 @@ TCPConnection::~TCPConnection() { try { if (closesocket(d_fd) < 0) - g_log << Logger::Error << "Error closing socket for TCPConnection" << endl; + SLOG(g_log << Logger::Error << "Error closing socket for TCPConnection" << endl, + g_logtcpin->info(Logr::Error, "Error closing socket for TCPConnection")); } catch (const PDNSException& e) { - g_log << Logger::Error << "Error closing TCPConnection socket: " << e.reason << endl; + SLOG(g_log << Logger::Error << "Error closing TCPConnection socket: " << e.reason << endl, + g_logtcpin->error(Logr::Error, e.reason, "Error closing TCPConnection socket", "exception", Logging::Loggable("PDNSException"))); } if (t_tcpClientCounts->count(d_remote) && !(*t_tcpClientCounts)[d_remote]--) @@ -224,7 +226,8 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) ssize_t remaining = isProxyHeaderComplete(conn->data); if (remaining == 0) { if (g_logCommonErrors) { - g_log << Logger::Error << "Unable to consume proxy protocol header in packet from TCP client " << conn->d_remote.toStringWithPort() << endl; + SLOG(g_log << Logger::Error << "Unable to consume proxy protocol header in packet from TCP client " << conn->d_remote.toStringWithPort() << endl, + g_logtcpin->info(Logr::Error, "Unable to consume proxy protocol header in packet from TCP client", "remote", Logging::Loggable(conn->d_remote))); } ++g_stats.proxyProtocolInvalidCount; return; @@ -244,14 +247,16 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) size_t used = parseProxyHeader(conn->data, proxy, conn->d_source, conn->d_destination, tcp, conn->proxyProtocolValues); if (used <= 0) { if (g_logCommonErrors) { - g_log << Logger::Error << "Unable to parse proxy protocol header in packet from TCP client " << conn->d_remote.toStringWithPort() << endl; + SLOG(g_log << Logger::Error << "Unable to parse proxy protocol header in packet from TCP client " << conn->d_remote.toStringWithPort() << endl, + g_logtcpin->info(Logr::Error, "Unable to parse proxy protocol header in packet from TCP client", "remote", Logging::Loggable(conn->d_remote))); } ++g_stats.proxyProtocolInvalidCount; return; } else if (static_cast(used) > g_proxyProtocolMaximumSize) { if (g_logCommonErrors) { - g_log << Logger::Error << "Proxy protocol header in packet from TCP client " << conn->d_remote.toStringWithPort() << " is larger than proxy-protocol-maximum-size (" << used << "), dropping" << endl; + SLOG(g_log << Logger::Error << "Proxy protocol header in packet from TCP client " << conn->d_remote.toStringWithPort() << " is larger than proxy-protocol-maximum-size (" << used << "), dropping" << endl, + g_logtcpin->info(Logr::Error, "Proxy protocol header in packet from TCP client is larger than proxy-protocol-maximum-size", "remote", Logging::Loggable(conn->d_remote), "size", Logging::Loggable(used))); } ++g_stats.proxyProtocolInvalidCount; return; @@ -268,7 +273,8 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) } if (t_allowFrom && !t_allowFrom->match(&conn->d_mappedSource)) { if (!g_quiet) { - g_log << Logger::Error << "[" << MT->getTid() << "] dropping TCP query from " << conn->d_mappedSource.toString() << ", address not matched by allow-from" << endl; + SLOG(g_log << Logger::Error << "[" << MT->getTid() << "] dropping TCP query from " << conn->d_mappedSource.toString() << ", address not matched by allow-from" << endl, + g_logtcpin->info(Logr::Error, "Dropping TCP query, address not matched by allow-from", "remote", Logging::Loggable(conn->d_remote))); } ++g_stats.unauthorizedTCP; @@ -307,7 +313,8 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) if (bytes <= 0) { if (!tcpGuard.handleTCPReadResult(fd, bytes)) { if (g_logCommonErrors) { - g_log << Logger::Error << "TCP client " << conn->d_remote.toStringWithPort() << " disconnected after first byte" << endl; + SLOG(g_log << Logger::Error << "TCP client " << conn->d_remote.toStringWithPort() << " disconnected after first byte" << endl, + g_logtcpin->info(Logr::Error, "TCP client disconnected after first byte", "remote", Logging::Loggable(conn->d_remote))); } } return; @@ -319,14 +326,16 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) if (bytes <= 0) { if (!tcpGuard.handleTCPReadResult(fd, bytes)) { if (g_logCommonErrors) { - g_log << Logger::Error << "TCP client " << conn->d_remote.toStringWithPort() << " disconnected while reading question body" << endl; + SLOG(g_log << Logger::Error << "TCP client " << conn->d_remote.toStringWithPort() << " disconnected while reading question body" << endl, + g_logtcpin->info(Logr::Error, "TCP client disconnected while reading question body", "remote", Logging::Loggable(conn->d_remote))); } } return; } else if (bytes > std::numeric_limits::max()) { if (g_logCommonErrors) { - g_log << Logger::Error << "TCP client " << conn->d_remote.toStringWithPort() << " sent an invalid question size while reading question body" << endl; + SLOG(g_log << Logger::Error << "TCP client " << conn->d_remote.toStringWithPort() << " sent an invalid question size while reading question body" << endl, + g_logtcpin->info(Logr::Error, "TCP client sent an invalid question size while reading question body", "remote", Logging::Loggable(conn->d_remote))); } return; } @@ -340,14 +349,16 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) catch (const MOADNSException& mde) { g_stats.clientParseError++; if (g_logCommonErrors) { - g_log << Logger::Error << "Unable to parse packet from TCP client " << conn->d_remote.toStringWithPort() << endl; + SLOG(g_log << Logger::Error << "Unable to parse packet from TCP client " << conn->d_remote.toStringWithPort() << endl, + g_logtcpin->info(Logr::Error, "Unable to parse packet from TCP client", "remte", Logging::Loggable(conn->d_remote))); } return; } if (SyncRes::isUnsupported(dc->d_mdp.d_qtype)) { g_stats.ignoredCount++; if (g_logCommonErrors) { - g_log << Logger::Error << "Unsupported qtype " << dc->d_mdp.d_qtype << " from TCP client " << conn->d_remote.toStringWithPort() << endl; + SLOG(g_log << Logger::Error << "Unsupported qtype " << dc->d_mdp.d_qtype << " from TCP client " << conn->d_remote.toStringWithPort() << endl, + g_logtcpin->info(Logr::Error, "Unsupported qtype from TCP client", "remote", Logging::Loggable(conn->d_remote), "qtype", Logging::Loggable(dc->d_mdp.d_qtype))); } return; } @@ -424,14 +435,16 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) } catch (const std::exception& e) { if (g_logCommonErrors) { - g_log << Logger::Warning << "Error parsing a query packet qname='" << qname << "' for tag determination, setting tag=0: " << e.what() << endl; + SLOG(g_log << Logger::Warning << "Error parsing a query packet qname='" << qname << "' for tag determination, setting tag=0: " << e.what() << endl, + g_logtcpin->info(Logr::Warning, "Error parsing a query packet for tag determination, setting tag=0", "remote", Logging::Loggable(conn->d_remote), "qname", Logging::Loggable(qname))); } } } } catch (const std::exception& e) { if (g_logCommonErrors) { - g_log << Logger::Warning << "Error parsing a query packet for tag determination, setting tag=0: " << e.what() << endl; + SLOG(g_log << Logger::Warning << "Error parsing a query packet for tag determination, setting tag=0: " << e.what() << endl, + g_logtcpin->error(Logr::Warning, e.what(), "Error parsing a query packet for tag determination, setting tag=0", "exception", Logging::Loggable("std::exception"), "remote", Logging::Loggable(conn->d_remote))); } } } @@ -459,7 +472,8 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) } catch (const std::exception& e) { if (g_logCommonErrors) { - g_log << Logger::Warning << "Error parsing a TCP query packet for edns subnet: " << e.what() << endl; + SLOG(g_log << Logger::Warning << "Error parsing a TCP query packet for edns subnet: " << e.what() << endl, + g_logtcpin->error(Logr::Warning, e.what(), "Error parsing a TCP query packet for edns subnet", "exception", Logging::Loggable("std::exception"), "remote", Logging::Loggable(conn->d_remote))); } } } @@ -468,7 +482,8 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) bool ipf = t_pdl->ipfilter(dc->d_source, dc->d_destination, *dh, dc->d_eventTrace); if (ipf) { if (!g_quiet) { - g_log << Logger::Notice << RecThreadInfo::id() << " [" << MT->getTid() << "/" << MT->numProcesses() << "] DROPPED TCP question from " << dc->d_source.toStringWithPort() << (dc->d_source != dc->d_remote ? " (via " + dc->d_remote.toStringWithPort() + ")" : "") << " based on policy" << endl; + SLOG(g_log << Logger::Notice << RecThreadInfo::id() << " [" << MT->getTid() << "/" << MT->numProcesses() << "] DROPPED TCP question from " << dc->d_source.toStringWithPort() << (dc->d_source != dc->d_remote ? " (via " + dc->d_remote.toStringWithPort() + ")" : "") << " based on policy" << endl, + g_logtcpin->info(Logr::Info, "Dropped TCP question based on policy", "remote", Logging::Loggable(conn->d_remote), "source", Logging::Loggable( dc->d_source))); } g_stats.policyDrops++; return; @@ -478,14 +493,16 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) if (dc->d_mdp.d_header.qr) { g_stats.ignoredCount++; if (g_logCommonErrors) { - g_log << Logger::Error << "Ignoring answer from TCP client " << dc->getRemote() << " on server socket!" << endl; + SLOG(g_log << Logger::Error << "Ignoring answer from TCP client " << dc->getRemote() << " on server socket!" << endl, + g_logtcpin->info(Logr::Error, "Ignoring answer from TCP client on server socket", "remote", Logging::Loggable(dc->getRemote()))); } return; } if (dc->d_mdp.d_header.opcode != Opcode::Query && dc->d_mdp.d_header.opcode != Opcode::Notify) { g_stats.ignoredCount++; if (g_logCommonErrors) { - g_log << Logger::Error << "Ignoring unsupported opcode " << Opcode::to_s(dc->d_mdp.d_header.opcode) << " from TCP client " << dc->getRemote() << " on server socket!" << endl; + SLOG(g_log << Logger::Error << "Ignoring unsupported opcode " << Opcode::to_s(dc->d_mdp.d_header.opcode) << " from TCP client " << dc->getRemote() << " on server socket!" << endl, + g_logtcpin->info(Logr::Error, "Ignoring unsupported opcode from TCP client", "remote", Logging::Loggable(dc->getRemote()), "opcode", Logging::Loggable(Opcode::to_s(dc->d_mdp.d_header.opcode)))); } sendErrorOverTCP(dc, RCode::NotImp); tcpGuard.keep(); @@ -494,7 +511,8 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) else if (dh->qdcount == 0) { g_stats.emptyQueriesCount++; if (g_logCommonErrors) { - g_log << Logger::Error << "Ignoring empty (qdcount == 0) query from " << dc->getRemote() << " on server socket!" << endl; + SLOG(g_log << Logger::Error << "Ignoring empty (qdcount == 0) query from " << dc->getRemote() << " on server socket!" << endl, + g_logtcpin->info(Logr::Error, "Ignoring empty (qdcount == 0) query on server socket", "remote", Logging::Loggable(dc->getRemote()))); } sendErrorOverTCP(dc, RCode::NotImp); tcpGuard.keep(); @@ -508,7 +526,8 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) if (dc->d_mdp.d_header.opcode == Opcode::Notify) { if (!t_allowNotifyFrom || !t_allowNotifyFrom->match(dc->d_mappedSource)) { if (!g_quiet) { - g_log << Logger::Error << "[" << MT->getTid() << "] dropping TCP NOTIFY from " << dc->d_mappedSource.toString() << ", address not matched by allow-notify-from" << endl; + SLOG(g_log << Logger::Error << "[" << MT->getTid() << "] dropping TCP NOTIFY from " << dc->d_mappedSource.toString() << ", address not matched by allow-notify-from" << endl, + g_logtcpin->info(Logr::Error, "Dropping TCP NOTIFY, address not matched by allow-notify-from", "source", Logging::Loggable(dc->d_mappedSource))); } g_stats.sourceDisallowedNotify++; @@ -517,7 +536,8 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) if (!isAllowNotifyForZone(qname)) { if (!g_quiet) { - g_log << Logger::Error << "[" << MT->getTid() << "] dropping TCP NOTIFY from " << dc->d_mappedSource.toString() << ", for " << qname.toLogString() << ", zone not matched by allow-notify-for" << endl; + SLOG(g_log << Logger::Error << "[" << MT->getTid() << "] dropping TCP NOTIFY from " << dc->d_mappedSource.toString() << ", for " << qname.toLogString() << ", zone not matched by allow-notify-for" << endl, + g_logtcpin->info(Logr::Error, "Dropping TCP NOTIFY, zone not matched by allow-notify-for", "source", Logging::Loggable(dc->d_mappedSource), "zone", Logging::Loggable(qname))); } g_stats.zoneDisallowedNotify++; @@ -538,7 +558,8 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) if (cacheHit) { if (!g_quiet) { - g_log << Logger::Notice << RecThreadInfo::id() << " TCP question answered from packet cache tag=" << dc->d_tag << " from " << dc->d_source.toStringWithPort() << (dc->d_source != dc->d_remote ? " (via " + dc->d_remote.toStringWithPort() + ")" : "") << endl; + SLOG(g_log << Logger::Notice << RecThreadInfo::id() << " TCP question answered from packet cache tag=" << dc->d_tag << " from " << dc->d_source.toStringWithPort() << (dc->d_source != dc->d_remote ? " (via " + dc->d_remote.toStringWithPort() + ")" : "") << endl, + g_logtcpin->info(Logr::Notice, "TCP question answered from packet cache", "tag", Logging::Loggable(dc->d_tag), "source", Logging::Loggable(dc->d_source), "remote", Logging::Loggable(dc->d_remote))); } bool hadError = sendResponseOverTCP(dc, response); @@ -558,7 +579,8 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) } if (dc->d_eventTrace.enabled() && SyncRes::s_event_trace_enabled & SyncRes::event_trace_to_log) { - g_log << Logger::Info << dc->d_eventTrace.toString() << endl; + SLOG(g_log << Logger::Info << dc->d_eventTrace.toString() << endl, + g_logtcpin->info(Logr::Info, dc->d_eventTrace.toString())); // More fancy? } tcpGuard.keep(); return; @@ -567,7 +589,8 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) if (dc->d_mdp.d_header.opcode == Opcode::Notify) { if (!g_quiet) { - g_log << Logger::Notice << RecThreadInfo::id() << " got NOTIFY for " << qname.toLogString() << " from " << dc->d_source.toStringWithPort() << (dc->d_source != dc->d_remote ? " (via " + dc->d_remote.toStringWithPort() + ")" : "") << endl; + SLOG(g_log << Logger::Notice << RecThreadInfo::id() << " got NOTIFY for " << qname.toLogString() << " from " << dc->d_source.toStringWithPort() << (dc->d_source != dc->d_remote ? " (via " + dc->d_remote.toStringWithPort() + ")" : "") << endl, + g_logtcpin->info(Logr::Notice, "Got NOTIFY", "qname", Logging::Loggable(qname), "source", Logging::Loggable(dc->d_source), "remote", Logging::Loggable(dc->d_remote))); } requestWipeCaches(qname); @@ -612,7 +635,8 @@ void handleNewTCPQuestion(int fd, FDMultiplexer::funcparam_t&) closesocket(newsock); } catch (const PDNSException& e) { - g_log << Logger::Error << "Error closing TCP socket after an over capacity drop: " << e.reason << endl; + SLOG(g_log << Logger::Error << "Error closing TCP socket after an over capacity drop: " << e.reason << endl, + g_logtcpin->error(Logr::Error, e.reason, "Error closing TCP socket after an over capacity drop", "exception", Logging::Loggable("PDNSException"))); } return; } @@ -630,14 +654,16 @@ void handleNewTCPQuestion(int fd, FDMultiplexer::funcparam_t&) } if (!fromProxyProtocolSource && t_allowFrom && !t_allowFrom->match(&mappedSource)) { if (!g_quiet) - g_log << Logger::Error << "[" << MT->getTid() << "] dropping TCP query from " << mappedSource.toString() << ", address neither matched by allow-from nor proxy-protocol-from" << endl; + SLOG(g_log << Logger::Error << "[" << MT->getTid() << "] dropping TCP query from " << mappedSource.toString() << ", address neither matched by allow-from nor proxy-protocol-from" << endl, + g_logtcpin->info(Logr::Error, "dropping TCP query address neither matched by allow-from nor proxy-protocol-from", "source", Logging::Loggable(mappedSource))); g_stats.unauthorizedTCP++; try { closesocket(newsock); } catch (const PDNSException& e) { - g_log << Logger::Error << "Error closing TCP socket after an ACL drop: " << e.reason << endl; + SLOG(g_log << Logger::Error << "Error closing TCP socket after an ACL drop: " << e.reason << endl, + g_logtcpin->error(Logr::Error, e.reason, "Error closing TCP socket after an ACL drop", "exception", Logging::Loggable("PDNSException"))); } return; } @@ -648,7 +674,8 @@ void handleNewTCPQuestion(int fd, FDMultiplexer::funcparam_t&) closesocket(newsock); // don't call TCPConnection::closeAndCleanup here - did not enter it in the counts yet! } catch (const PDNSException& e) { - g_log << Logger::Error << "Error closing TCP socket after an overflow drop: " << e.reason << endl; + SLOG(g_log << Logger::Error << "Error closing TCP socket after an overflow drop: " << e.reason << endl, + g_logtcpin->error(Logr::Error, e.reason, "Error closing TCP socket after an overflow drop", "exception", Logging::Loggable("PDNSException"))); } return; } diff --git a/pdns/syncres.hh b/pdns/syncres.hh index 0817107a3f..b1078b9739 100644 --- a/pdns/syncres.hh +++ b/pdns/syncres.hh @@ -504,6 +504,7 @@ public: boost::optional d_routingTag; ComboAddress d_fromAuthIP; RecEventTrace d_eventTrace; + std::shared_ptr d_slog = g_slog->withName("syncres"); unsigned int d_authzonequeries; unsigned int d_outqueries;