]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Replace commented out logging code with #if 0 sections. NFCI
authorMiod Vallat <miod.vallat@powerdns.com>
Wed, 12 Nov 2025 07:02:08 +0000 (08:02 +0100)
committerMiod Vallat <miod.vallat@powerdns.com>
Wed, 12 Nov 2025 07:02:08 +0000 (08:02 +0100)
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
modules/tinydnsbackend/tinydnsbackend.cc
pdns/auth-primarycommunicator.cc
pdns/backends/gsql/gsqlbackend.cc
pdns/packethandler.cc
pdns/ueberbackend.cc

index 625b16f4bf1880e9405c25091b229dec2618978d..8712df8df92a4d5b7d61745ffd9c4c071c6f86cd 100644 (file)
@@ -299,8 +299,10 @@ bool TinyDNSBackend::get(DNSResourceRecord& rr)
     string val = record.second;
     string key = record.first;
 
-    //DLOG(g_log<<Logger::Debug<<"[GET] Key: "<<makeHexDump(key)<<endl);
-    //DLOG(g_log<<Logger::Debug<<"[GET] Val: "<<makeHexDump(val)<<endl);
+#if 0
+    DLOG(g_log<<Logger::Debug<<"[GET] Key: "<<makeHexDump(key)<<endl);
+    DLOG(g_log<<Logger::Debug<<"[GET] Val: "<<makeHexDump(val)<<endl);
+#endif
     if (key[0] == '\000' && key[1] == '\045') { // skip locations
       continue;
     }
@@ -404,7 +406,9 @@ bool TinyDNSBackend::get(DNSResourceRecord& rr)
           throw;
         }
       }
-      //      DLOG(g_log<<Logger::Debug<<backendname<<"Returning ["<<rr.content<<"] for ["<<rr.qname<<"] of RecordType ["<<rr.qtype.toString()<<"]"<<endl;);
+#if 0
+      DLOG(g_log<<Logger::Debug<<backendname<<"Returning ["<<rr.content<<"] for ["<<rr.qname<<"] of RecordType ["<<rr.qtype.toString()<<"]"<<endl;);
+#endif
       return true;
     }
   } // end of while
index ab6c341d2f4f215833cdc8a3784e0ec53daa4a2e..e989684ec18ec574a7947740dd8115f54cb5de6b 100644 (file)
@@ -244,7 +244,9 @@ time_t CommunicatorClass::doNotifications(PacketHandler* P)
     }
     else {
       g_log << Logger::Warning << "Received spurious notify answer for '" << p.qdomain << "' from " << from.toStringWithPort() << endl;
-      // d_nq.dump();
+#if 0
+      d_nq.dump();
+#endif
     }
   }
 
index d1a4d19c438cfcfbfe598d149be4a6a949905174..120d216bd3fa688eb7c3e221c7df16050178202d 100644 (file)
@@ -1553,7 +1553,9 @@ bool GSQLBackend::listSubZone(const ZoneName &zone, domainid_t domain_id) {
 
 bool GSQLBackend::get(DNSResourceRecord &r)
 {
-  // g_log << "GSQLBackend get() was called for "<<qtype.toString() << " record: ";
+#if 0 // could make sense, but we don't have a qtype to use here...
+  g_log << "GSQLBackend get() was called for "<<qtype.toString() << " record: ";
+#endif
   SSqlStatement::row_t row;
 
 skiprow:
index dc188eb904745ad1c4de36c1148b994ab18ff61e..983a32096a974f224e9efeee0e811359cffb5d36 100644 (file)
@@ -1612,7 +1612,9 @@ bool PacketHandler::opcodeQueryInner(DNSPacket& pkt, queryState &state)
 {
   state.r=pkt.replyPacket();  // generate an empty reply packet, possibly with TSIG details inside
 
-  // g_log<<Logger::Warning<<"Query for '"<<pkt.qdomain<<"' "<<pkt.qtype.toString()<<" from "<<pkt.getRemoteString()<< " (tcp="<<pkt.d_tcp<<")"<<endl;
+#if 0
+  g_log<<Logger::Warning<<"Query for '"<<pkt.qdomain<<"' "<<pkt.qtype.toString()<<" from "<<pkt.getRemoteString()<< " (tcp="<<pkt.d_tcp<<")"<<endl;
+#endif
 
   if(pkt.qtype.getCode()==QType::IXFR) {
     state.r->setRcode(RCode::Refused);
@@ -1983,11 +1985,13 @@ bool PacketHandler::opcodeQueryInner2(DNSPacket& pkt, queryState &state, bool re
       return true;
     }
     // check whether this could be fixed easily
-    // if (*(rrset.back().dr.d_name.rbegin()) == '.') {
-    //      g_log<<Logger::Error<<"Should not get here ("<<pkt.qdomain<<"|"<<pkt.qtype.toString()<<"): you have a trailing dot, this could be the problem (or run 'pdnsutil zone rectify " <<d_sd.qname()<<"')"<<endl;
-    // } else {
-         g_log<<Logger::Error<<"Should not get here ("<<pkt.qdomain<<"|"<<pkt.qtype.toString()<<"): please run 'pdnsutil zone rectify "<<d_sd.qname()<<"'"<<endl;
-    // }
+#if 0
+    if (*(rrset.back().dr.d_name.getStorage().rbegin()) == '.') {
+      g_log<<Logger::Error<<"Should not get here ("<<pkt.qdomain<<"|"<<pkt.qtype.toString()<<"): you have a trailing dot, this could be the problem (or run 'pdnsutil zone rectify " <<d_sd.qname()<<"')"<<endl;
+    } else {
+      g_log<<Logger::Error<<"Should not get here ("<<pkt.qdomain<<"|"<<pkt.qtype.toString()<<"): please run 'pdnsutil zone rectify "<<d_sd.qname()<<"'"<<endl;
+    }
+#endif
   }
   else {
     DLOG(g_log<<"Have some data, but not the right data"<<endl);
index e6270b190e481b809c3e10c050ac83738843592e..6aac817aaf6068fa104dd163133edb2efdb15324 100644 (file)
@@ -727,7 +727,9 @@ enum UeberBackend::CacheResult UeberBackend::cacheHas(const Question& question,
   }
 
   resourceRecords.clear();
-  //  g_log<<Logger::Warning<<"looking up: '"<<q.qname+"'|N|"+q.qtype.getName()+"|"+itoa(q.zoneId)<<endl;
+#if 0
+  g_log<<Logger::Warning<<"looking up: '"<<question.qname<<"'|N|"<<question.qtype<<"|"<<std::to_string(question.zoneId)<<endl;
+#endif
 
   bool ret = QC.getEntry(question.qname, question.qtype, resourceRecords, question.zoneId); // think about lowercasing here
   if (!ret) {