]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Convert protocol buffer code to structured logging
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 23 Dec 2025 15:30:49 +0000 (16:30 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 19 Jan 2026 10:00:54 +0000 (11:00 +0100)
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
pdns/dnsdistdist/dnsdist-protobuf.cc

index bb039ef01891c19614019cf08bc7f9909ddb4a90..a4423a55222f414094f91ad378ac449d99f3dbeb 100644 (file)
@@ -203,7 +203,8 @@ void DNSDistProtoBufMessage::serialize(std::string& data, bool withOpenTelemetry
       msg.addRRsFromPacket(reinterpret_cast<const char*>(d_dr->getData().data()), d_dr->getData().size(), d_includeCNAME);
     }
     catch (const std::exception& exp) {
-      vinfolog("Error while parsing the RRs from a response packet to add them to the protobuf message: %s", exp.what());
+      VERBOSESLOG(infolog("Error while parsing the RRs from a response packet to add them to the protobuf message: %s", exp.what()),
+                  dnsdist::logging::getTopLogger()->error(Logr::Info, exp.what(), "Error while parsing the RRs from a response packet to add them to the protobuf message"));
     }
   }
   else {