From e6a9dde524b57bb57f1d063ef195bb1e2667c5fc Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Fri, 16 Mar 2018 09:33:07 +0100 Subject: [PATCH] Logging: have a global g_log --- docs/appendices/backend-writers-guide.rst | 6 +- modules/bindbackend/bindbackend2.cc | 68 ++-- modules/bindbackend/binddnssec.cc | 4 +- modules/geoipbackend/geoipbackend.cc | 16 +- modules/geoipbackend/geoipinterface-mmdb.cc | 6 +- modules/gmysqlbackend/gmysqlbackend.cc | 6 +- modules/gmysqlbackend/smysql.cc | 6 +- modules/godbcbackend/godbcbackend.cc | 6 +- modules/godbcbackend/sodbc.cc | 2 +- modules/goraclebackend/goraclebackend.cc | 6 +- modules/goraclebackend/soracle.cc | 4 +- modules/gpgsqlbackend/gpgsqlbackend.cc | 6 +- modules/gpgsqlbackend/spgsql.cc | 4 +- modules/gsqlite3backend/gsqlite3backend.cc | 6 +- modules/ldapbackend/ldapauthenticator.cc | 22 +- modules/ldapbackend/ldapbackend.cc | 78 ++--- modules/lua2backend/lua2api2.hh | 20 +- modules/lua2backend/lua2backend.cc | 2 +- modules/luabackend/dnssec.cc | 58 ++-- modules/luabackend/lua_functions.cc | 2 +- modules/luabackend/luabackend.cc | 2 +- modules/luabackend/luabackend.hh | 1 - modules/luabackend/master.cc | 8 +- modules/luabackend/minimal.cc | 22 +- modules/luabackend/reload.cc | 4 +- modules/luabackend/slave.cc | 32 +- modules/luabackend/supermaster.cc | 8 +- modules/mydnsbackend/mydnsbackend.cc | 20 +- modules/opendbxbackend/odbxbackend.cc | 114 +++---- modules/opendbxbackend/odbxbackend.hh | 2 +- modules/opendbxbackend/odbxprivate.cc | 28 +- modules/oraclebackend/oraclebackend.cc | 6 +- modules/pipebackend/pipebackend.cc | 32 +- modules/randombackend/randombackend.cc | 2 +- modules/remotebackend/httpconnector.cc | 16 +- modules/remotebackend/pipeconnector.cc | 4 +- modules/remotebackend/remotebackend.cc | 14 +- modules/remotebackend/unixconnector.cc | 14 +- modules/remotebackend/zmqconnector.cc | 14 +- modules/tinydnsbackend/cdb.cc | 4 +- modules/tinydnsbackend/tinydnsbackend.cc | 24 +- pdns/arguments.cc | 12 +- pdns/auth-carbon.cc | 8 +- pdns/auth-packetcache.cc | 8 +- pdns/auth-querycache.cc | 8 +- pdns/backends/gsql/gsqlbackend.cc | 12 +- pdns/common_startup.cc | 30 +- pdns/communicator.cc | 14 +- pdns/dbdnsseckeeper.cc | 10 +- pdns/distributor.hh | 34 +- pdns/dns.hh | 1 - pdns/dnsbackend.cc | 18 +- pdns/dnsdist-carbon.cc | 1 - pdns/dnsdist.cc | 2 +- pdns/dnspacket.cc | 20 +- pdns/dnsproxy.cc | 32 +- pdns/dnsreplay.cc | 2 - pdns/dnsscan.cc | 2 - pdns/dnssecsigner.cc | 2 +- pdns/dynhandler.cc | 12 +- pdns/dynlistener.cc | 64 ++-- pdns/gss_context.cc | 16 +- pdns/logger.cc | 16 +- pdns/logger.hh | 10 +- pdns/lua-auth4.cc | 1 - pdns/lua-base4.cc | 7 +- pdns/lua-base4.hh | 2 - pdns/lua-recursor4.cc | 4 +- pdns/lwres.cc | 6 +- pdns/mastercommunicator.cc | 36 +-- pdns/nameserver.cc | 34 +- pdns/notify.cc | 1 - pdns/nproxy.cc | 1 - pdns/packethandler.cc | 130 ++++---- pdns/pdns_recursor.cc | 324 ++++++++++---------- pdns/pdnsutil.cc | 4 +- pdns/pkcs11signers.cc | 22 +- pdns/randomhelper.cc | 8 +- pdns/rec-carbon.cc | 10 +- pdns/rec-lua-conf.cc | 36 +-- pdns/rec-snmp.cc | 4 +- pdns/rec_channel_rec.cc | 30 +- pdns/receiver.cc | 88 +++--- pdns/recursor_cache.hh | 2 - pdns/recursordist/test-syncres_cc.cc | 12 +- pdns/reczones.cc | 38 +-- pdns/remote_logger.cc | 4 +- pdns/rfc2136handler.cc | 138 ++++----- pdns/rpzloader.cc | 32 +- pdns/secpoll-auth.cc | 10 +- pdns/secpoll-recursor.cc | 10 +- pdns/serialtweaker.cc | 4 +- pdns/signingpipe.cc | 6 +- pdns/slavecommunicator.cc | 110 +++---- pdns/ssqlite3.cc | 4 +- pdns/stubresolver.cc | 6 +- pdns/syncres.cc | 14 +- pdns/tcpreceiver.cc | 164 +++++----- pdns/test-lua_auth4_cc.cc | 2 +- pdns/tkey.cc | 2 +- pdns/ueberbackend.cc | 54 ++-- pdns/unix_semaphore.cc | 2 +- pdns/unix_utility.cc | 26 +- pdns/validate-recursor.cc | 2 +- pdns/validate.cc | 2 +- pdns/version.cc | 12 +- pdns/webserver.cc | 50 +-- pdns/ws-auth.cc | 4 +- pdns/ws-recursor.cc | 12 +- 109 files changed, 1239 insertions(+), 1264 deletions(-) diff --git a/docs/appendices/backend-writers-guide.rst b/docs/appendices/backend-writers-guide.rst index baffdbb1c..3d7d7f058 100644 --- a/docs/appendices/backend-writers-guide.rst +++ b/docs/appendices/backend-writers-guide.rst @@ -203,7 +203,7 @@ furthermore, only about its A record: RandomLoader() { BackendMakers().report(new RandomFactory); - L << Logger::Info << "[randombackend] This is the random backend version " VERSION " reporting" << endl; + g_log << Logger::Info << "[randombackend] This is the random backend version " VERSION " reporting" << endl; } }; @@ -625,7 +625,7 @@ The actual code in PowerDNS is currently: resolver.axfr(remote,domain.c_str()); db->startTransaction(domain, domain_id); - L<commitTransaction(); db->setFresh(domain_id); - L<&parts, Utility::pid safePutBBDomainInfo(bbd); - L< oldnames, newnames; { @@ -814,15 +814,15 @@ void Bind2Backend::loadConfig(string* status) ++i) { if (!(i->hadFileDirective)) { - L<name<<"' has no 'file' directive set in "<name<<"' has no 'file' directive set in "<type == "") - L<name<<"' has no type specified, assuming 'native'"<name<<"' has no type specified, assuming 'native'"<type!="master" && i->type!="slave" && i->type != "native" && i->type != "") { - L<name<<"' because type '"<type<<"' is invalid"<name<<"' because type '"<type<<"' is invalid"<name<<"' from file '"<filename<<"'"<name<<"' from file '"<filename<<"'"<empty()) - DLOG(L<<"Query with no results"<size()<<" available in total!"<qtype==qtype.getCode())) { - DLOG(L<qtype).getName()<<": '"<content<<"'"<qtype).getName()<<": '"<content<<"'"<qtype).getCode()<qtype).getCode()<begin(); @@ -1237,7 +1237,7 @@ bool Bind2Backend::superMasterBackend(const string &ip, const DNSName& domain, c ifstream c_if(getArg("supermasters").c_str(), std::ios::in); // this was nocreate? if (!c_if) { - L << Logger::Error << "Unable to open supermasters file for read: " << stringerror() << endl; + g_log << Logger::Error << "Unable to open supermasters file for read: " << stringerror() << endl; return false; } @@ -1288,7 +1288,7 @@ bool Bind2Backend::createSlaveDomain(const string &ip, const DNSName& domain, co { string filename = getArg("supermaster-destdir")+'/'+domain.toStringNoDot(); - L << Logger::Warning << d_logprefix + g_log << Logger::Warning << d_logprefix << " Writing bind config zone statement for superslave zone '" << domain << "' from supermaster " << ip << endl; @@ -1297,7 +1297,7 @@ bool Bind2Backend::createSlaveDomain(const string &ip, const DNSName& domain, co ofstream c_of(getArg("supermaster-config").c_str(), std::ios::app); if (!c_of) { - L << Logger::Error << "Unable to open supermaster configfile for append: " << stringerror() << endl; + g_log << Logger::Error << "Unable to open supermaster configfile for append: " << stringerror() << endl; throw DBException("Unable to open supermaster configfile for append: "+stringerror()); } @@ -1323,7 +1323,7 @@ bool Bind2Backend::searchRecords(const string &pattern, int maxResults, vectord_iterations > maxNSEC3Iterations) { ns3p->d_iterations = maxNSEC3Iterations; - L<d_algorithm != 1) { - L<d_algorithm)<<"', setting to 1 for zone '"<d_algorithm)<<"', setting to 1 for zone '"<d_algorithm = 1; } } diff --git a/modules/geoipbackend/geoipbackend.cc b/modules/geoipbackend/geoipbackend.cc index 58d662099..1953da6cd 100644 --- a/modules/geoipbackend/geoipbackend.cc +++ b/modules/geoipbackend/geoipbackend.cc @@ -99,7 +99,7 @@ void GeoIPBackend::initialize() { } if (s_geoip_files.empty()) - L<second.as(); if (rr.weight < 0) { - L<second.as(); } else { - L< SMySQL::prepare(const string& query, int nparams) void SMySQL::execute(const string& query) { if(s_dolog) - L<setOption( LDAP_OPT_DEREF, LDAP_DEREF_ALWAYS ); @@ -94,20 +94,20 @@ LdapBackend::LdapBackend( const string &suffix ) } m_pldap->bind( m_authenticator ); - L << Logger::Notice << m_myname << " Ldap connection succeeded" << endl; + g_log << Logger::Notice << m_myname << " Ldap connection succeeded" << endl; return; } catch( LDAPTimeout < ) { - L << Logger::Error << m_myname << " Ldap connection to server failed because of timeout" << endl; + g_log << Logger::Error << m_myname << " Ldap connection to server failed because of timeout" << endl; } catch( LDAPException &le ) { - L << Logger::Error << m_myname << " Ldap connection to server failed: " << le.what() << endl; + g_log << Logger::Error << m_myname << " Ldap connection to server failed: " << le.what() << endl; } catch( std::exception &e ) { - L << Logger::Error << m_myname << " Caught STL exception: " << e.what() << endl; + g_log << Logger::Error << m_myname << " Caught STL exception: " << e.what() << endl; } if( m_pldap != NULL ) { delete( m_pldap ); } @@ -120,7 +120,7 @@ LdapBackend::~LdapBackend() { delete( m_pldap ); delete( m_authenticator ); - L << Logger::Notice << m_myname << " Ldap connection closed" << endl; + g_log << Logger::Notice << m_myname << " Ldap connection closed" << endl; } @@ -130,7 +130,7 @@ bool LdapBackend::reconnect() int attempts = m_reconnect_attempts; bool connected = false; while ( !connected && attempts > 0 ) { - L << Logger::Debug << m_myname << " Reconnection attempts left: " << attempts << endl; + g_log << Logger::Debug << m_myname << " Reconnection attempts left: " << attempts << endl; connected = m_pldap->connect(); if ( !connected ) Utility::usleep( 250 ); @@ -158,12 +158,12 @@ bool LdapBackend::list( const DNSName& target, int domain_id, bool include_disab } catch( LDAPTimeout < ) { - L << Logger::Warning << m_myname << " Unable to get zone " << target << " from LDAP directory: " << lt.what() << endl; + g_log << Logger::Warning << m_myname << " Unable to get zone " << target << " from LDAP directory: " << lt.what() << endl; throw( DBException( "LDAP server timeout" ) ); } catch( LDAPNoConnection &lnc ) { - L << Logger::Warning << m_myname << " Connection to LDAP lost, trying to reconnect" << endl; + g_log << Logger::Warning << m_myname << " Connection to LDAP lost, trying to reconnect" << endl; if ( reconnect() ) this->list( target, domain_id ); else @@ -171,12 +171,12 @@ bool LdapBackend::list( const DNSName& target, int domain_id, bool include_disab } catch( LDAPException &le ) { - L << Logger::Error << m_myname << " Unable to get zone " << target << " from LDAP directory: " << le.what() << endl; + g_log << Logger::Error << m_myname << " Unable to get zone " << target << " from LDAP directory: " << le.what() << endl; throw( PDNSException( "LDAP server unreachable" ) ); // try to reconnect to another server } catch( std::exception &e ) { - L << Logger::Error << m_myname << " Caught STL exception for target " << target << ": " << e.what() << endl; + g_log << Logger::Error << m_myname << " Caught STL exception for target " << target << ": " << e.what() << endl; throw( DBException( "STL exception" ) ); } @@ -211,7 +211,7 @@ inline bool LdapBackend::list_simple( const DNSName& target, int domain_id ) prepare(); filter = strbind( ":target:", "associatedDomain=*." + qesc, getArg( "filter-axfr" ) ); - DLOG( L << Logger::Debug << m_myname << " Search = basedn: " << dn << ", filter: " << filter << endl ); + DLOG( g_log << Logger::Debug << m_myname << " Search = basedn: " << dn << ", filter: " << filter << endl ); m_msgid = m_pldap->search( dn, LDAP_SCOPE_SUBTREE, filter, (const char**) ldap_attrany ); return true; @@ -223,7 +223,7 @@ inline bool LdapBackend::list_strict( const DNSName& target, int domain_id ) { if( target.isPartOf(DNSName("in-addr.arpa")) || target.isPartOf(DNSName("ip6.arpa")) ) { - L << Logger::Warning << m_myname << " Request for reverse zone AXFR, but this is not supported in strict mode" << endl; + g_log << Logger::Warning << m_myname << " Request for reverse zone AXFR, but this is not supported in strict mode" << endl; return false; // AXFR isn't supported in strict mode. Use simple mode and additional PTR records } @@ -241,17 +241,17 @@ void LdapBackend::lookup( const QType &qtype, const DNSName &qname, DNSPacket *d m_adomain = m_adomains.end(); // skip loops in get() first time m_qtype = qtype; - if( m_qlog ) { L.log( "Query: '" + qname.toStringRootDot() + "|" + qtype.getName() + "'", Logger::Error ); } + if( m_qlog ) { g_log.log( "Query: '" + qname.toStringRootDot() + "|" + qtype.getName() + "'", Logger::Error ); } (this->*m_lookup_fcnt)( qtype, qname, dnspkt, zoneid ); } catch( LDAPTimeout < ) { - L << Logger::Warning << m_myname << " Unable to search LDAP directory: " << lt.what() << endl; + g_log << Logger::Warning << m_myname << " Unable to search LDAP directory: " << lt.what() << endl; throw( DBException( "LDAP server timeout" ) ); } catch( LDAPNoConnection &lnc ) { - L << Logger::Warning << m_myname << " Connection to LDAP lost, trying to reconnect" << endl; + g_log << Logger::Warning << m_myname << " Connection to LDAP lost, trying to reconnect" << endl; if ( reconnect() ) this->lookup( qtype, qname, dnspkt, zoneid ); else @@ -259,12 +259,12 @@ void LdapBackend::lookup( const QType &qtype, const DNSName &qname, DNSPacket *d } catch( LDAPException &le ) { - L << Logger::Error << m_myname << " Unable to search LDAP directory: " << le.what() << endl; + g_log << Logger::Error << m_myname << " Unable to search LDAP directory: " << le.what() << endl; throw( PDNSException( "LDAP server unreachable" ) ); // try to reconnect to another server } catch( std::exception &e ) { - L << Logger::Error << m_myname << " Caught STL exception for qname " << qname << ": " << e.what() << endl; + g_log << Logger::Error << m_myname << " Caught STL exception for qname " << qname << ": " << e.what() << endl; throw( DBException( "STL exception" ) ); } } @@ -291,7 +291,7 @@ void LdapBackend::lookup_simple( const QType &qtype, const DNSName &qname, DNSPa filter = strbind( ":target:", filter, getArg( "filter-lookup" ) ); - DLOG( L << Logger::Debug << m_myname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl ); + DLOG( g_log << Logger::Debug << m_myname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl ); m_msgid = m_pldap->search( getArg( "basedn" ), LDAP_SCOPE_SUBTREE, filter, attributes ); } @@ -336,7 +336,7 @@ void LdapBackend::lookup_strict( const QType &qtype, const DNSName &qname, DNSPa filter = strbind( ":target:", filter, getArg( "filter-lookup" ) ); - DLOG( L << Logger::Debug << m_myname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl ); + DLOG( g_log << Logger::Debug << m_myname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl ); m_msgid = m_pldap->search( getArg( "basedn" ), LDAP_SCOPE_SUBTREE, filter, attributes ); } @@ -369,7 +369,7 @@ void LdapBackend::lookup_tree( const QType &qtype, const DNSName &qname, DNSPack dn = "dc=" + *i + "," + dn; } - DLOG( L << Logger::Debug << m_myname << " Search = basedn: " << dn + getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl ); + DLOG( g_log << Logger::Debug << m_myname << " Search = basedn: " << dn + getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl ); m_msgid = m_pldap->search( dn + getArg( "basedn" ), LDAP_SCOPE_BASE, filter, attributes ); } @@ -387,7 +387,7 @@ inline bool LdapBackend::prepare() m_ttl = (uint32_t) strtol( m_result["dNSTTL"][0].c_str(), &endptr, 10 ); if( *endptr != '\0' ) { - L << Logger::Warning << m_myname << " Invalid time to live for " << m_qname << ": " << m_result["dNSTTL"][0] << endl; + g_log << Logger::Warning << m_myname << " Invalid time to live for " << m_qname << ": " << m_result["dNSTTL"][0] << endl; m_ttl = m_default_ttl; } m_result.erase( "dNSTTL" ); @@ -397,7 +397,7 @@ inline bool LdapBackend::prepare() { if( ( m_last_modified = str2tstamp( m_result["modifyTimestamp"][0] ) ) == 0 ) { - L << Logger::Warning << m_myname << " Invalid modifyTimestamp for " << m_qname << ": " << m_result["modifyTimestamp"][0] << endl; + g_log << Logger::Warning << m_myname << " Invalid modifyTimestamp for " << m_qname << ": " << m_result["modifyTimestamp"][0] << endl; } m_result.erase( "modifyTimestamp" ); } @@ -503,7 +503,7 @@ bool LdapBackend::get( DNSResourceRecord &rr ) rr.content = *m_value; m_value++; - DLOG( L << Logger::Debug << m_myname << " Record = qname: " << rr.qname << ", qtype: " << (rr.qtype).getName() << ", ttl: " << rr.ttl << ", content: " << rr.content << endl ); + DLOG( g_log << Logger::Debug << m_myname << " Record = qname: " << rr.qname << ", qtype: " << (rr.qtype).getName() << ", ttl: " << rr.ttl << ", content: " << rr.content << endl ); return true; } @@ -520,17 +520,17 @@ bool LdapBackend::get( DNSResourceRecord &rr ) } catch( LDAPTimeout < ) { - L << Logger::Warning << m_myname << " Search failed: " << lt.what() << endl; + g_log << Logger::Warning << m_myname << " Search failed: " << lt.what() << endl; throw( DBException( "LDAP server timeout" ) ); } catch( LDAPException &le ) { - L << Logger::Error << m_myname << " Search failed: " << le.what() << endl; + g_log << Logger::Error << m_myname << " Search failed: " << le.what() << endl; throw( PDNSException( "LDAP server unreachable" ) ); // try to reconnect to another server } catch( std::exception &e ) { - L << Logger::Error << m_myname << " Caught STL exception for " << m_qname << ": " << e.what() << endl; + g_log << Logger::Error << m_myname << " Caught STL exception for " << m_qname << ": " << e.what() << endl; throw( DBException( "STL exception" ) ); } @@ -557,12 +557,12 @@ void LdapBackend::getUpdatedMasters( vector* domains ) } catch( LDAPTimeout < ) { - L << Logger::Warning << m_myname << " Unable to search LDAP directory: " << lt.what() << endl; + g_log << Logger::Warning << m_myname << " Unable to search LDAP directory: " << lt.what() << endl; throw( DBException( "LDAP server timeout" ) ); } catch( LDAPNoConnection &lnc ) { - L << Logger::Warning << m_myname << " Connection to LDAP lost, trying to reconnect" << endl; + g_log << Logger::Warning << m_myname << " Connection to LDAP lost, trying to reconnect" << endl; if ( reconnect() ) this->getUpdatedMasters( domains ); else @@ -570,7 +570,7 @@ void LdapBackend::getUpdatedMasters( vector* domains ) } catch( LDAPException &le ) { - L << Logger::Error << m_myname << " Unable to search LDAP directory: " << le.what() << endl; + g_log << Logger::Error << m_myname << " Unable to search LDAP directory: " << le.what() << endl; throw( PDNSException( "LDAP server unreachable" ) ); // try to reconnect to another server } catch( std::exception &e ) @@ -610,12 +610,12 @@ void LdapBackend::setNotified( uint32_t id, uint32_t serial ) } catch( LDAPTimeout < ) { - L << Logger::Warning << m_myname << " Unable to search LDAP directory: " << lt.what() << endl; + g_log << Logger::Warning << m_myname << " Unable to search LDAP directory: " << lt.what() << endl; throw( DBException( "LDAP server timeout" ) ); } catch( LDAPNoConnection &lnc ) { - L << Logger::Warning << m_myname << " Connection to LDAP lost, trying to reconnect" << endl; + g_log << Logger::Warning << m_myname << " Connection to LDAP lost, trying to reconnect" << endl; if ( reconnect() ) this->setNotified( id, serial ); else @@ -623,7 +623,7 @@ void LdapBackend::setNotified( uint32_t id, uint32_t serial ) } catch( LDAPException &le ) { - L << Logger::Error << m_myname << " Unable to search LDAP directory: " << le.what() << endl; + g_log << Logger::Error << m_myname << " Unable to search LDAP directory: " << le.what() << endl; throw( PDNSException( "LDAP server unreachable" ) ); // try to reconnect to another server } catch( std::exception &e ) @@ -656,7 +656,7 @@ void LdapBackend::setNotified( uint32_t id, uint32_t serial ) } catch( LDAPNoConnection &lnc ) { - L << Logger::Warning << m_myname << " Connection to LDAP lost, trying to reconnect" << endl; + g_log << Logger::Warning << m_myname << " Connection to LDAP lost, trying to reconnect" << endl; if ( reconnect() ) this->setNotified( id, serial ); else @@ -664,7 +664,7 @@ void LdapBackend::setNotified( uint32_t id, uint32_t serial ) } catch( LDAPException &le ) { - L << Logger::Error << m_myname << " Unable to search LDAP directory: " << le.what() << endl; + g_log << Logger::Error << m_myname << " Unable to search LDAP directory: " << le.what() << endl; throw( PDNSException( "LDAP server unreachable" ) ); // try to reconnect to another server } catch( std::exception &e ) @@ -699,12 +699,12 @@ bool LdapBackend::getDomainInfo( const DNSName& domain, DomainInfo& di ) } catch( LDAPTimeout < ) { - L << Logger::Warning << m_myname << " Unable to search LDAP directory: " << lt.what() << endl; + g_log << Logger::Warning << m_myname << " Unable to search LDAP directory: " << lt.what() << endl; throw( DBException( "LDAP server timeout" ) ); } catch( LDAPNoConnection &lnc ) { - L << Logger::Warning << m_myname << " Connection to LDAP lost, trying to reconnect" << endl; + g_log << Logger::Warning << m_myname << " Connection to LDAP lost, trying to reconnect" << endl; if ( reconnect() ) this->getDomainInfo( domain, di ); else @@ -712,7 +712,7 @@ bool LdapBackend::getDomainInfo( const DNSName& domain, DomainInfo& di ) } catch( LDAPException &le ) { - L << Logger::Error << m_myname << " Unable to search LDAP directory: " << le.what() << endl; + g_log << Logger::Error << m_myname << " Unable to search LDAP directory: " << le.what() << endl; throw( PDNSException( "LDAP server unreachable" ) ); // try to reconnect to another server } catch( std::exception &e ) @@ -815,7 +815,7 @@ class LdapLoader LdapLoader() { BackendMakers().report( &factory ); - L << Logger::Info << "[ldapbackend] This is the ldap backend version " VERSION + g_log << Logger::Info << "[ldapbackend] This is the ldap backend version " VERSION #ifndef REPRODUCIBLE << " (" __DATE__ " " __TIME__ ")" #endif diff --git a/modules/lua2backend/lua2api2.hh b/modules/lua2backend/lua2api2.hh index 40b309570..6e5084643 100644 --- a/modules/lua2backend/lua2api2.hh +++ b/modules/lua2backend/lua2api2.hh @@ -73,8 +73,8 @@ public: ~Lua2BackendAPIv2(); - #define logCall(func, var) { if (d_debug_log) { L<(item.second); else - L<(item.second)); else - L<(item.second); else - L<(result); if (row.size() != 3) { - L<updateDNSSECOrderAndAuthAbsolute(domain_id, qname, ins, auth); } if(logging) - L << Logger::Info << backend_name << "(updateDNSSECOrderAndAuth) BEGIN domain_id: '" << domain_id << "' zonename: '" << zonename << "' qname: '" << qname << "' auth: '" << auth << "'" << endl; + g_log << Logger::Info << backend_name << "(updateDNSSECOrderAndAuth) BEGIN domain_id: '" << domain_id << "' zonename: '" << zonename << "' qname: '" << qname << "' auth: '" << auth << "'" << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_updatednssecorderandauth); @@ -67,7 +67,7 @@ bool LUABackend::updateDNSSECOrderAndAuth(uint32_t domain_id, const DNSName& zon lua_pop(lua, 1); if(logging) - L << Logger::Info << backend_name << "(updateDNSSECOrderAndAuth) END" << endl; + g_log << Logger::Info << backend_name << "(updateDNSSECOrderAndAuth) END" << endl; return ok; } @@ -83,7 +83,7 @@ bool LUABackend::updateDNSSECOrderAndAuthAbsolute(uint32_t domain_id, const DNSN return false; if(logging) - L << Logger::Info << backend_name << "(updateDNSSECOrderAndAuthAbsolute) BEGIN domain_id: '" << domain_id << "' qname: '" << qname << "' ordername: '" << ordername << "' auth: '" << auth << "'" << endl; + g_log << Logger::Info << backend_name << "(updateDNSSECOrderAndAuthAbsolute) BEGIN domain_id: '" << domain_id << "' qname: '" << qname << "' ordername: '" << ordername << "' auth: '" << auth << "'" << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_updatednssecorderandauthabsolute); @@ -109,7 +109,7 @@ bool LUABackend::updateDNSSECOrderAndAuthAbsolute(uint32_t domain_id, const DNSN lua_pop(lua, 1); if(logging) - L << Logger::Info << backend_name << "(updateDNSSECOrderAndAuthAbsolute) END" << endl; + g_log << Logger::Info << backend_name << "(updateDNSSECOrderAndAuthAbsolute) END" << endl; return ok; } @@ -124,7 +124,7 @@ bool LUABackend::getBeforeAndAfterNamesAbsolute(uint32_t id, const DNSName& qnam after.clear(); if(logging) - L << Logger::Info << backend_name << "(getBeforeAndAfterNamesAbsolute) BEGIN id: '" << id << "' qname: '" << qname << "'" << endl; + g_log << Logger::Info << backend_name << "(getBeforeAndAfterNamesAbsolute) BEGIN id: '" << id << "' qname: '" << qname << "'" << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_updatednssecorderandauthabsolute); @@ -144,7 +144,7 @@ bool LUABackend::getBeforeAndAfterNamesAbsolute(uint32_t id, const DNSName& qnam if (!ok) { if(logging) - L << Logger::Info << backend_name << "(getBeforeAndAfterNamesAbsolute) ERROR!" << endl; + g_log << Logger::Info << backend_name << "(getBeforeAndAfterNamesAbsolute) ERROR!" << endl; return false; } @@ -166,7 +166,7 @@ bool LUABackend::getBeforeAndAfterNamesAbsolute(uint32_t id, const DNSName& qnam lua_pop(lua, 1); if(logging) - L << Logger::Info << backend_name << "(getBeforeAndAfterNamesAbsolute) END unhashed: '" << unhashed << "' before: '" << before << "' after: '" << after << "' " << endl; + g_log << Logger::Info << backend_name << "(getBeforeAndAfterNamesAbsolute) END unhashed: '" << unhashed << "' before: '" << before << "' after: '" << after << "' " << endl; return ok; } @@ -177,7 +177,7 @@ bool LUABackend::updateDomainKey(const DNSName& name, unsigned int &id, bool too return false; if(logging) - L << Logger::Info << backend_name << "(updateDomainKey) BEGIN name: '" << name << "' id: '" << id << "' toowhat: '" << toowhat << "'" << endl; + g_log << Logger::Info << backend_name << "(updateDomainKey) BEGIN name: '" << name << "' id: '" << id << "' toowhat: '" << toowhat << "'" << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_updatedomainkey); @@ -202,7 +202,7 @@ bool LUABackend::updateDomainKey(const DNSName& name, unsigned int &id, bool too lua_pop(lua, 1); if(logging) - L << Logger::Info << backend_name << "(updateDomainKey) END" << endl; + g_log << Logger::Info << backend_name << "(updateDomainKey) END" << endl; return ok; } @@ -213,7 +213,7 @@ bool LUABackend::activateDomainKey(const DNSName& name, unsigned int id) { return updateDomainKey(name, id, true); if(logging) - L << Logger::Info << backend_name << "(activateDomainKey) BEGIN name: '" << name << "' id: '" << id << endl; + g_log << Logger::Info << backend_name << "(activateDomainKey) BEGIN name: '" << name << "' id: '" << id << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_activatedomainkey); @@ -237,7 +237,7 @@ bool LUABackend::activateDomainKey(const DNSName& name, unsigned int id) { lua_pop(lua, 1); if(logging) - L << Logger::Info << backend_name << "(activateDomainKey) END" << endl; + g_log << Logger::Info << backend_name << "(activateDomainKey) END" << endl; return ok; } @@ -248,7 +248,7 @@ bool LUABackend::deactivateDomainKey(const DNSName& name, unsigned int id) { return updateDomainKey(name, id, false); if(logging) - L << Logger::Info << backend_name << "(deactivateDomainKey) BEGIN name: '" << name << "' id: '" << id << endl; + g_log << Logger::Info << backend_name << "(deactivateDomainKey) BEGIN name: '" << name << "' id: '" << id << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_deactivatedomainkey); @@ -272,7 +272,7 @@ bool LUABackend::deactivateDomainKey(const DNSName& name, unsigned int id) { lua_pop(lua, 1); if(logging) - L << Logger::Info << backend_name << "(deactivateDomainKey) END" << endl; + g_log << Logger::Info << backend_name << "(deactivateDomainKey) END" << endl; return ok; } @@ -283,7 +283,7 @@ bool LUABackend::removeDomainKey(const DNSName& name, unsigned int id) { return false; if(logging) - L << Logger::Info << backend_name << "(removeDomainKey) BEGIN name: '" << name << "' id: '" << id << endl; + g_log << Logger::Info << backend_name << "(removeDomainKey) BEGIN name: '" << name << "' id: '" << id << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_removedomainkey); @@ -307,7 +307,7 @@ bool LUABackend::removeDomainKey(const DNSName& name, unsigned int id) { lua_pop(lua, 1); if(logging) - L << Logger::Info << backend_name << "(removeDomainKey) END" << endl; + g_log << Logger::Info << backend_name << "(removeDomainKey) END" << endl; return ok; } @@ -321,7 +321,7 @@ bool LUABackend::addDomainKey(const DNSName& name, const KeyData& key, int64_t& return false; if(logging) - //L << Logger::Info << backend_name << "(addDomainKey) BEGIN name: '" << name << "' id: '" << id << endl; + //g_log << Logger::Info << backend_name << "(addDomainKey) BEGIN name: '" << name << "' id: '" << id << endl; cerr << backend_name << "(addDomainKey) BEGIN name: '" << name << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_adddomainkey); @@ -368,7 +368,7 @@ bool LUABackend::getDomainKeys(const DNSName& name, std::vector& keys) return false; if(logging) - L << Logger::Info << backend_name << "(getDomainKeys) BEGIN name: '" << name << endl; + g_log << Logger::Info << backend_name << "(getDomainKeys) BEGIN name: '" << name << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_getdomainkeys); @@ -386,7 +386,7 @@ bool LUABackend::getDomainKeys(const DNSName& name, std::vector& keys) if (returnedwhat != LUA_TTABLE) { lua_pop(lua, 1); if(logging) - L << Logger::Info << backend_name << "(getDomainKeys) ERROR!" << endl; + g_log << Logger::Info << backend_name << "(getDomainKeys) ERROR!" << endl; return false; } @@ -416,7 +416,7 @@ bool LUABackend::getDomainKeys(const DNSName& name, std::vector& keys) } if(logging) - L << Logger::Info << backend_name << "(getDomainKeys) END" << endl; + g_log << Logger::Info << backend_name << "(getDomainKeys) END" << endl; return j > 0; } @@ -427,7 +427,7 @@ bool LUABackend::getTSIGKey(const DNSName& name, DNSName* algorithm, string* con return false; if(logging) - L << Logger::Info << backend_name << "(getTSIGKey) BEGIN name: '" << name << "'" << endl; + g_log << Logger::Info << backend_name << "(getTSIGKey) BEGIN name: '" << name << "'" << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_gettsigkey); @@ -444,7 +444,7 @@ bool LUABackend::getTSIGKey(const DNSName& name, DNSName* algorithm, string* con if ( (lua_type(lua, -1) != LUA_TSTRING) && (lua_type(lua, -2) != LUA_TSTRING) ) { lua_pop(lua, 2); if(logging) - L << Logger::Info << backend_name << "(getTSIGKey) ERROR" << endl; + g_log << Logger::Info << backend_name << "(getTSIGKey) ERROR" << endl; return false; } @@ -460,7 +460,7 @@ bool LUABackend::getTSIGKey(const DNSName& name, DNSName* algorithm, string* con *content = c; if(logging) - L << Logger::Info << backend_name << "(getTSIGKey) END" << endl; + g_log << Logger::Info << backend_name << "(getTSIGKey) END" << endl; return true; } @@ -471,7 +471,7 @@ bool LUABackend::setDomainMetadata(const DNSName& name, const std::string& kind, return false; if(logging) - L << Logger::Info << backend_name << "(setDomainMetadata) BEGIN name: '" << name << "' kind: '" << kind << "'" << endl; + g_log << Logger::Info << backend_name << "(setDomainMetadata) BEGIN name: '" << name << "' kind: '" << kind << "'" << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_setdomainmetadata); @@ -508,7 +508,7 @@ bool LUABackend::setDomainMetadata(const DNSName& name, const std::string& kind, lua_pop(lua, 1); if(logging) - L << Logger::Info << backend_name << "(setDomainMetadata) END" << endl; + g_log << Logger::Info << backend_name << "(setDomainMetadata) END" << endl; return ok; @@ -519,7 +519,7 @@ bool LUABackend::getDomainMetadata(const DNSName& name, const std::string& kind, return false; if(logging) - L << Logger::Info << backend_name << "(getDomainMetadata) BEGIN name: '" << name << "' kind: '" << kind << "'" << endl; + g_log << Logger::Info << backend_name << "(getDomainMetadata) BEGIN name: '" << name << "' kind: '" << kind << "'" << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_getdomainmetadata); @@ -553,7 +553,7 @@ bool LUABackend::getDomainMetadata(const DNSName& name, const std::string& kind, } if(logging) - L << Logger::Info << backend_name << "(getDomainMetadata) END" << endl; + g_log << Logger::Info << backend_name << "(getDomainMetadata) END" << endl; return j > 0; @@ -565,7 +565,7 @@ void LUABackend::alsoNotifies(const DNSName& domain, set *ips) { return; if(logging) - L << Logger::Info << backend_name << "(alsonotifies) BEGIN domain: '" << domain << "'" << endl; + g_log << Logger::Info << backend_name << "(alsonotifies) BEGIN domain: '" << domain << "'" << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_alsonotifies); @@ -596,7 +596,7 @@ void LUABackend::alsoNotifies(const DNSName& domain, set *ips) { } if(logging) - L << Logger::Info << backend_name << "(alsoNotifies) END" << endl; + g_log << Logger::Info << backend_name << "(alsoNotifies) END" << endl; return; diff --git a/modules/luabackend/lua_functions.cc b/modules/luabackend/lua_functions.cc index 5c6212787..cd57a0074 100644 --- a/modules/luabackend/lua_functions.cc +++ b/modules/luabackend/lua_functions.cc @@ -158,7 +158,7 @@ int l_logger (lua_State *lua) { space = " "; } - L.log(lb->backend_name + s.str(), (Logger::Urgency) log_level); + g_log.log(lb->backend_name + s.str(), (Logger::Urgency) log_level); return 0; } diff --git a/modules/luabackend/luabackend.cc b/modules/luabackend/luabackend.cc index 72600a8bd..57d059c1a 100644 --- a/modules/luabackend/luabackend.cc +++ b/modules/luabackend/luabackend.cc @@ -57,7 +57,7 @@ public: { BackendMakers().report(new LUAFactory); - L << Logger::Info << "[luabackend] This is the lua backend version " VERSION + g_log << Logger::Info << "[luabackend] This is the lua backend version " VERSION #ifndef REPRODUCIBLE << " (" __DATE__ " " __TIME__ ")" #endif diff --git a/modules/luabackend/luabackend.hh b/modules/luabackend/luabackend.hh index b96fdadff..5e1f3ac95 100644 --- a/modules/luabackend/luabackend.hh +++ b/modules/luabackend/luabackend.hh @@ -36,7 +36,6 @@ #include using std::string; -//#undef L diff --git a/modules/luabackend/master.cc b/modules/luabackend/master.cc index 9b5293fdd..6ca3dc69e 100644 --- a/modules/luabackend/master.cc +++ b/modules/luabackend/master.cc @@ -34,7 +34,7 @@ void LUABackend::getUpdatedMasters(vector* domains) { return; if (logging) - L << Logger::Info << backend_name << "(getUpdatedMasters) BEGIN" << endl; + g_log << Logger::Info << backend_name << "(getUpdatedMasters) BEGIN" << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_getupdatedmasters); @@ -55,7 +55,7 @@ void LUABackend::getUpdatedMasters(vector* domains) { domains_from_table(domains, "getUpdatedMasters"); if (logging) - L << Logger::Info << backend_name << "(getUpdatedMasters) END" << endl; + g_log << Logger::Info << backend_name << "(getUpdatedMasters) END" << endl; } void LUABackend::setNotified(uint32_t id, uint32_t serial) { @@ -64,7 +64,7 @@ void LUABackend::setNotified(uint32_t id, uint32_t serial) { return; if (logging) - L << Logger::Info << backend_name << "(setNotified) BEGIN" << endl; + g_log << Logger::Info << backend_name << "(setNotified) BEGIN" << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_setnotified); @@ -80,6 +80,6 @@ void LUABackend::setNotified(uint32_t id, uint32_t serial) { } if (logging) - L << Logger::Info << backend_name << "(setNotified) END" << endl; + g_log << Logger::Info << backend_name << "(setNotified) END" << endl; } diff --git a/modules/luabackend/minimal.cc b/modules/luabackend/minimal.cc index 24b3e7e4a..9cc0bf63e 100644 --- a/modules/luabackend/minimal.cc +++ b/modules/luabackend/minimal.cc @@ -54,7 +54,7 @@ LUABackend::LUABackend(const string &suffix) { } catch(LUAException &e) { - L<* domains) { return; if (logging) - L << Logger::Info << backend_name << "(getUnfreshSlaveInfos) BEGIN" << endl; + g_log << Logger::Info << backend_name << "(getUnfreshSlaveInfos) BEGIN" << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_getunfreshslaveinfos); @@ -220,7 +220,7 @@ void LUABackend::getUnfreshSlaveInfos(vector* domains) { domains_from_table(domains, "getUnfreshSlaveInfos"); if (logging) - L << Logger::Info << backend_name << "(getUnfreshSlaveInfos) END" << endl; + g_log << Logger::Info << backend_name << "(getUnfreshSlaveInfos) END" << endl; } @@ -230,7 +230,7 @@ bool LUABackend::isMaster(const DNSName& domain, const string &ip) { return false; if (logging) - L << Logger::Error << backend_name << "(isMaster) BEGIN" << endl; + g_log << Logger::Error << backend_name << "(isMaster) BEGIN" << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_ismaster); @@ -253,7 +253,7 @@ bool LUABackend::isMaster(const DNSName& domain, const string &ip) { lua_pop(lua, 1); if (logging) - L << Logger::Info << backend_name << "(isMaster) END" << endl; + g_log << Logger::Info << backend_name << "(isMaster) END" << endl; return ok; } @@ -263,7 +263,7 @@ bool LUABackend::getDomainInfo(const DNSName&domain, DomainInfo &di) { return false; if (logging) - L << Logger::Info << backend_name << "(getDomainInfo) BEGIN" << endl; + g_log << Logger::Info << backend_name << "(getDomainInfo) BEGIN" << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_getdomaininfo); @@ -283,7 +283,7 @@ bool LUABackend::getDomainInfo(const DNSName&domain, DomainInfo &di) { } if (logging) - L << Logger::Info << backend_name << "(getDomainInfo) END" << endl; + g_log << Logger::Info << backend_name << "(getDomainInfo) END" << endl; return domaininfo_from_table(&di); } diff --git a/modules/luabackend/supermaster.cc b/modules/luabackend/supermaster.cc index 9fdc575e9..e3075ae8b 100644 --- a/modules/luabackend/supermaster.cc +++ b/modules/luabackend/supermaster.cc @@ -43,7 +43,7 @@ bool LUABackend::superMasterBackend(const string &ip, const DNSName &domain, con return false; if (logging) - L << Logger::Info << backend_name << "(superMasterBackend) BEGIN" << endl; + g_log << Logger::Info << backend_name << "(superMasterBackend) BEGIN" << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_supermasterbackend); @@ -97,7 +97,7 @@ bool LUABackend::superMasterBackend(const string &ip, const DNSName &domain, con } if (logging) - L << Logger::Info << backend_name << "(superMasterBackend) END" << endl; + g_log << Logger::Info << backend_name << "(superMasterBackend) END" << endl; return ok; } @@ -108,7 +108,7 @@ bool LUABackend::createSlaveDomain(const string &ip, const DNSName& domain, cons return false; if (logging) - L << Logger::Info << backend_name << "(createSlaveDomain) BEGIN" << endl; + g_log << Logger::Info << backend_name << "(createSlaveDomain) BEGIN" << endl; lua_rawgeti(lua, LUA_REGISTRYINDEX, f_lua_createslavedomain); @@ -133,7 +133,7 @@ bool LUABackend::createSlaveDomain(const string &ip, const DNSName& domain, cons lua_pop(lua, 1); if (logging) - L << Logger::Info << backend_name << "(createSlaveDomain) END" << endl; + g_log << Logger::Info << backend_name << "(createSlaveDomain) END" << endl; return ok; } diff --git a/modules/mydnsbackend/mydnsbackend.cc b/modules/mydnsbackend/mydnsbackend.cc index 8f57af230..9f06e3e92 100644 --- a/modules/mydnsbackend/mydnsbackend.cc +++ b/modules/mydnsbackend/mydnsbackend.cc @@ -75,7 +75,7 @@ MyDNSBackend::MyDNSBackend(const string &suffix) { d_db->setLog(::arg().mustDo("query-logging")); } catch(SSqlException &e) { - L<prepare(basicQuery, 4); d_anyQuery_stmt = d_db->prepare(anyQuery, 5); } catch (SSqlException &e) { - L<1) { - L<1) { - L<1) { - L< bind("domain_id", zoneId)-> @@ -331,7 +331,7 @@ void MyDNSBackend::lookup(const QType &qtype, const DNSName &qname, DNSPacket *p bind("qname2", sdom.toString())-> execute(); } else { - DLOG(L< bind("domain_id", zoneId)-> @@ -489,7 +489,7 @@ class MyDNSLoader { public: MyDNSLoader() { BackendMakers().report(new MyDNSFactory()); - L << Logger::Info << "[mydnsbackend] This is the mydns backend version " VERSION + g_log << Logger::Info << "[mydnsbackend] This is the mydns backend version " VERSION #ifndef REPRODUCIBLE << " (" __DATE__ " " __TIME__ ")" #endif diff --git a/modules/opendbxbackend/odbxbackend.cc b/modules/opendbxbackend/odbxbackend.cc index e8d37f1cc..ae05d5397 100644 --- a/modules/opendbxbackend/odbxbackend.cc +++ b/modules/opendbxbackend/odbxbackend.cc @@ -60,7 +60,7 @@ OdbxBackend::OdbxBackend( const string& suffix ) if( getArg( "host" ).size() > 0 ) { - L.log( m_myname + " WARNING: Using deprecated opendbx-host parameter", Logger::Warning ); + g_log.log( m_myname + " WARNING: Using deprecated opendbx-host parameter", Logger::Warning ); stringtok( m_hosts[READ], getArg( "host" ), ", " ); m_hosts[WRITE] = m_hosts[READ]; } @@ -75,7 +75,7 @@ OdbxBackend::OdbxBackend( const string& suffix ) } catch( std::exception& e ) { - L.log( m_myname + " OdbxBackend(): Caught STL exception - " + e.what(), Logger::Error ); + g_log.log( m_myname + " OdbxBackend(): Caught STL exception - " + e.what(), Logger::Error ); throw( PDNSException( "Fatal: STL exception" ) ); } } @@ -100,7 +100,7 @@ bool OdbxBackend::getDomainInfo( const DNSName& domain, DomainInfo& di ) try { - DLOG( L.log( m_myname + " getDomainInfo()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " getDomainInfo()", Logger::Debug ) ); string stmt = getArg( "sql-zoneinfo" ); string& stmtref = strbind( ":name", escape( domain.makeLowerCase().toStringRootDot(), READ ), stmt ); @@ -170,7 +170,7 @@ bool OdbxBackend::getDomainInfo( const DNSName& domain, DomainInfo& di ) } catch( std::exception& e ) { - L.log( m_myname + " getDomainInfo: Caught STL std::exception - " + e.what(), Logger::Error ); + g_log.log( m_myname + " getDomainInfo: Caught STL std::exception - " + e.what(), Logger::Error ); return false; } @@ -186,7 +186,7 @@ bool OdbxBackend::getSOA( const DNSName& domain, SOAData& sd, bool unmodifiedSer try { - DLOG( L.log( m_myname + " getSOA()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " getSOA()", Logger::Debug ) ); string stmt = getArg( "sql-lookupsoa" ); string& stmtref = strbind( ":name", escape( domain.makeLowerCase().toStringRootDot(), READ ), stmt ); @@ -236,7 +236,7 @@ bool OdbxBackend::getSOA( const DNSName& domain, SOAData& sd, bool unmodifiedSer } catch( std::exception& e ) { - L.log( m_myname + " getSOA: Caught STL exception - " + e.what(), Logger::Error ); + g_log.log( m_myname + " getSOA: Caught STL exception - " + e.what(), Logger::Error ); return false; } @@ -249,7 +249,7 @@ bool OdbxBackend::list( const DNSName& target, int zoneid, bool include_disabled { try { - DLOG( L.log( m_myname + " list()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " list()", Logger::Debug ) ); m_qname.clear(); m_result = NULL; @@ -258,13 +258,13 @@ bool OdbxBackend::list( const DNSName& target, int zoneid, bool include_disabled if( len < 0 ) { - L.log( m_myname + " list: Unable to convert zone id to string - format error", Logger::Error ); + g_log.log( m_myname + " list: Unable to convert zone id to string - format error", Logger::Error ); return false; } if( len > static_cast(sizeof( m_buffer )) - 1 ) { - L.log( m_myname + " list: Unable to convert zone id to string - insufficient buffer space", Logger::Error ); + g_log.log( m_myname + " list: Unable to convert zone id to string - insufficient buffer space", Logger::Error ); return false; } @@ -275,7 +275,7 @@ bool OdbxBackend::list( const DNSName& target, int zoneid, bool include_disabled } catch( std::exception& e ) { - L.log( m_myname + " list: Caught STL exception - " + e.what(), Logger::Error ); + g_log.log( m_myname + " list: Caught STL exception - " + e.what(), Logger::Error ); return false; } @@ -288,7 +288,7 @@ void OdbxBackend::lookup( const QType& qtype, const DNSName& qname, DNSPacket* d { try { - DLOG( L.log( m_myname + " lookup()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " lookup()", Logger::Debug ) ); string stmt; string& stmtref = stmt; @@ -320,13 +320,13 @@ void OdbxBackend::lookup( const QType& qtype, const DNSName& qname, DNSPacket* d if( len < 0 ) { - L.log( m_myname + " lookup: Unable to convert zone id to string - format error", Logger::Error ); + g_log.log( m_myname + " lookup: Unable to convert zone id to string - format error", Logger::Error ); throw( DBException( "Error: Libc error" ) ); } if( len > static_cast(sizeof( m_buffer )) - 1 ) { - L.log( m_myname + " lookup: Unable to convert zone id to string - insufficient buffer space", Logger::Error ); + g_log.log( m_myname + " lookup: Unable to convert zone id to string - insufficient buffer space", Logger::Error ); throw( DBException( "Error: Libc error" ) ); } @@ -342,7 +342,7 @@ void OdbxBackend::lookup( const QType& qtype, const DNSName& qname, DNSPacket* d } catch( std::exception& e ) { - L.log( m_myname + " lookup: Caught STL exception - " + e.what(), Logger::Error ); + g_log.log( m_myname + " lookup: Caught STL exception - " + e.what(), Logger::Error ); throw( DBException( "Error: STL exception" ) ); } } @@ -356,7 +356,7 @@ bool OdbxBackend::get( DNSResourceRecord& rr ) try { - DLOG( L.log( m_myname + " get()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " get()", Logger::Debug ) ); if( getRecord( READ ) ) { @@ -405,7 +405,7 @@ bool OdbxBackend::get( DNSResourceRecord& rr ) } catch( std::exception& e ) { - L.log( m_myname + " get: Caught STL exception - " + e.what(), Logger::Error ); + g_log.log( m_myname + " get: Caught STL exception - " + e.what(), Logger::Error ); return false; } @@ -420,11 +420,11 @@ void OdbxBackend::setFresh( uint32_t domain_id ) try { - DLOG( L.log( m_myname + " setFresh()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " setFresh()", Logger::Debug ) ); if( !m_handle[WRITE] && !connectTo( m_hosts[WRITE], WRITE ) ) { - L.log( m_myname + " setFresh: Master server is unreachable", Logger::Error ); + g_log.log( m_myname + " setFresh: Master server is unreachable", Logger::Error ); throw( DBException( "Error: Server unreachable" ) ); } @@ -432,13 +432,13 @@ void OdbxBackend::setFresh( uint32_t domain_id ) if( len < 0 ) { - L.log( m_myname + " setFresh: Unable to insert values into statement '" + getArg( "sql-update-lastcheck" ) + "' - format error", Logger::Error ); + g_log.log( m_myname + " setFresh: Unable to insert values into statement '" + getArg( "sql-update-lastcheck" ) + "' - format error", Logger::Error ); throw( DBException( "Error: Libc error" ) ); } if( len > static_cast(sizeof( m_buffer )) - 1 ) { - L.log( m_myname + " setFresh: Unable to insert values into statement '" + getArg( "sql-update-lastcheck" ) + "' - insufficient buffer space", Logger::Error ); + g_log.log( m_myname + " setFresh: Unable to insert values into statement '" + getArg( "sql-update-lastcheck" ) + "' - insufficient buffer space", Logger::Error ); throw( DBException( "Error: Libc error" ) ); } @@ -449,7 +449,7 @@ void OdbxBackend::setFresh( uint32_t domain_id ) } catch ( std::exception& e ) { - L.log( m_myname + " setFresh: Caught STL exception - " + e.what(), Logger::Error ); + g_log.log( m_myname + " setFresh: Caught STL exception - " + e.what(), Logger::Error ); throw( DBException( "Error: STL exception" ) ); } } @@ -460,11 +460,11 @@ void OdbxBackend::setNotified( uint32_t domain_id, uint32_t serial ) { try { - DLOG( L.log( m_myname + " setNotified()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " setNotified()", Logger::Debug ) ); if( !m_handle[WRITE] && !connectTo( m_hosts[WRITE], WRITE ) ) { - L.log( m_myname + " setFresh: Master server is unreachable", Logger::Error ); + g_log.log( m_myname + " setFresh: Master server is unreachable", Logger::Error ); throw( DBException( "Error: Server unreachable" ) ); } @@ -472,13 +472,13 @@ void OdbxBackend::setNotified( uint32_t domain_id, uint32_t serial ) if( len < 0 ) { - L.log( m_myname + " setNotified: Unable to insert values into statement '" + getArg( "sql-update-serial" ) + "' - format error", Logger::Error ); + g_log.log( m_myname + " setNotified: Unable to insert values into statement '" + getArg( "sql-update-serial" ) + "' - format error", Logger::Error ); throw( DBException( "Error: Libc error" ) ); } if( len > static_cast(sizeof( m_buffer )) - 1 ) { - L.log( m_myname + " setNotified: Unable to insert values into statement '" + getArg( "sql-update-serial" ) + "' - insufficient buffer space", Logger::Error ); + g_log.log( m_myname + " setNotified: Unable to insert values into statement '" + getArg( "sql-update-serial" ) + "' - insufficient buffer space", Logger::Error ); throw( DBException( "Error: Libc error" ) ); } @@ -489,7 +489,7 @@ void OdbxBackend::setNotified( uint32_t domain_id, uint32_t serial ) } catch ( std::exception& e ) { - L.log( m_myname + " setNotified: Caught STL exception - " + e.what(), Logger::Error ); + g_log.log( m_myname + " setNotified: Caught STL exception - " + e.what(), Logger::Error ); throw( DBException( "Error: STL exception" ) ); } } @@ -500,7 +500,7 @@ bool OdbxBackend::isMaster( const DNSName& domain, const string& ip ) { try { - DLOG( L.log( m_myname + " isMaster()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " isMaster()", Logger::Debug ) ); string stmt = getArg( "sql-master" ); string& stmtref = strbind( ":name", escape( domain.makeLowerCase().toStringRootDot(), READ ), stmt ); @@ -523,7 +523,7 @@ bool OdbxBackend::isMaster( const DNSName& domain, const string& ip ) } catch ( std::exception& e ) { - L.log( m_myname + " isMaster: Caught STL exception - " + e.what(), Logger::Error ); + g_log.log( m_myname + " isMaster: Caught STL exception - " + e.what(), Logger::Error ); return false; } @@ -536,11 +536,11 @@ void OdbxBackend::getUnfreshSlaveInfos( vector* unfresh ) { try { - DLOG( L.log( m_myname + " getUnfreshSlaveInfos()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " getUnfreshSlaveInfos()", Logger::Debug ) ); if( unfresh == NULL ) { - L.log( m_myname + " getUnfreshSlaveInfos: invalid parameter - NULL pointer", Logger::Error ); + g_log.log( m_myname + " getUnfreshSlaveInfos: invalid parameter - NULL pointer", Logger::Error ); return; } @@ -548,7 +548,7 @@ void OdbxBackend::getUnfreshSlaveInfos( vector* unfresh ) } catch ( std::exception& e ) { - L.log( m_myname + " getUnfreshSlaveInfo: Caught STL exception - " + e.what(), Logger::Error ); + g_log.log( m_myname + " getUnfreshSlaveInfo: Caught STL exception - " + e.what(), Logger::Error ); } } @@ -558,11 +558,11 @@ void OdbxBackend::getUpdatedMasters( vector* updated ) { try { - DLOG( L.log( m_myname + " getUpdatedMasters()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " getUpdatedMasters()", Logger::Debug ) ); if( updated == NULL ) { - L.log( m_myname + " getUpdatedMasters: invalid parameter - NULL pointer", Logger::Error ); + g_log.log( m_myname + " getUpdatedMasters: invalid parameter - NULL pointer", Logger::Error ); return; } @@ -570,7 +570,7 @@ void OdbxBackend::getUpdatedMasters( vector* updated ) } catch ( std::exception& e ) { - L.log( m_myname + " getUpdatedMasters: Caught STL exception - " + e.what(), Logger::Error ); + g_log.log( m_myname + " getUpdatedMasters: Caught STL exception - " + e.what(), Logger::Error ); } } @@ -580,7 +580,7 @@ bool OdbxBackend::superMasterBackend( const string& ip, const DNSName& domain, c { try { - DLOG( L.log( m_myname + " superMasterBackend()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " superMasterBackend()", Logger::Debug ) ); if( account != NULL && ddb != NULL ) { @@ -611,7 +611,7 @@ bool OdbxBackend::superMasterBackend( const string& ip, const DNSName& domain, c } catch ( std::exception& e ) { - L.log( m_myname + " superMasterBackend: Caught STL exception - " + e.what(), Logger::Error ); + g_log.log( m_myname + " superMasterBackend: Caught STL exception - " + e.what(), Logger::Error ); return false; } @@ -624,11 +624,11 @@ bool OdbxBackend::createSlaveDomain( const string& ip, const DNSName& domain, co { try { - DLOG( L.log( m_myname + " createSlaveDomain()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " createSlaveDomain()", Logger::Debug ) ); if( !m_handle[WRITE] && !connectTo( m_hosts[WRITE], WRITE ) ) { - L.log( m_myname + " createSlaveDomain: Master server is unreachable", Logger::Error ); + g_log.log( m_myname + " createSlaveDomain: Master server is unreachable", Logger::Error ); return false; } @@ -637,13 +637,13 @@ bool OdbxBackend::createSlaveDomain( const string& ip, const DNSName& domain, co if( len < 0 ) { - L.log( m_myname + " createSlaveDomain: Unable to insert values in statement '" + getArg( "sql-insert-slave" ) + "' - format error", Logger::Error ); + g_log.log( m_myname + " createSlaveDomain: Unable to insert values in statement '" + getArg( "sql-insert-slave" ) + "' - format error", Logger::Error ); return false; } if( len > static_cast(sizeof( m_buffer )) - 1 ) { - L.log( m_myname + " createSlaveDomain: Unable to insert values in statement '" + getArg( "sql-insert-slave" ) + "' - insufficient buffer space", Logger::Error ); + g_log.log( m_myname + " createSlaveDomain: Unable to insert values in statement '" + getArg( "sql-insert-slave" ) + "' - insufficient buffer space", Logger::Error ); return false; } @@ -651,7 +651,7 @@ bool OdbxBackend::createSlaveDomain( const string& ip, const DNSName& domain, co } catch ( std::exception& e ) { - L.log( m_myname + " createSlaveDomain: Caught STL exception - " + e.what(), Logger::Error ); + g_log.log( m_myname + " createSlaveDomain: Caught STL exception - " + e.what(), Logger::Error ); return false; } @@ -664,11 +664,11 @@ bool OdbxBackend::feedRecord( const DNSResourceRecord& rr, const DNSName& ordern { try { - DLOG( L.log( m_myname + " feedRecord()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " feedRecord()", Logger::Debug ) ); if( !m_handle[WRITE] && !connectTo( m_hosts[WRITE], WRITE ) ) { - L.log( m_myname + " feedRecord: Master server is unreachable", Logger::Error ); + g_log.log( m_myname + " feedRecord: Master server is unreachable", Logger::Error ); return false; } @@ -689,13 +689,13 @@ bool OdbxBackend::feedRecord( const DNSResourceRecord& rr, const DNSName& ordern if( len < 0 ) { - L.log( m_myname + " feedRecord: Unable to insert values in statement '" + getArg( "sql-insert-record" ) + "' - format error", Logger::Error ); + g_log.log( m_myname + " feedRecord: Unable to insert values in statement '" + getArg( "sql-insert-record" ) + "' - format error", Logger::Error ); return false; } if( len > static_cast(sizeof( m_buffer )) - 1 ) { - L.log( m_myname + " feedRecord: Unable to insert values in statement '" + getArg( "sql-insert-record" ) + "' - insufficient buffer space", Logger::Error ); + g_log.log( m_myname + " feedRecord: Unable to insert values in statement '" + getArg( "sql-insert-record" ) + "' - insufficient buffer space", Logger::Error ); return false; } @@ -703,7 +703,7 @@ bool OdbxBackend::feedRecord( const DNSResourceRecord& rr, const DNSName& ordern } catch ( std::exception& e ) { - L.log( m_myname + " feedRecord: Caught STL exception - " + e.what(), Logger::Error ); + g_log.log( m_myname + " feedRecord: Caught STL exception - " + e.what(), Logger::Error ); return false; } @@ -716,11 +716,11 @@ bool OdbxBackend::startTransaction( const DNSName& domain, int zoneid ) { try { - DLOG( L.log( m_myname + " startTransaction()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " startTransaction()", Logger::Debug ) ); if( !m_handle[WRITE] && !connectTo( m_hosts[WRITE], WRITE ) ) { - L.log( m_myname + " startTransaction: Master server is unreachable", Logger::Error ); + g_log.log( m_myname + " startTransaction: Master server is unreachable", Logger::Error ); return false; } @@ -730,13 +730,13 @@ bool OdbxBackend::startTransaction( const DNSName& domain, int zoneid ) if( len < 0 ) { - L.log( m_myname + " startTransaction: Unable to convert zone id to string - format error", Logger::Error ); + g_log.log( m_myname + " startTransaction: Unable to convert zone id to string - format error", Logger::Error ); return false; } if( len > static_cast(sizeof( m_buffer )) - 1 ) { - L.log( m_myname + " startTransaction: Unable to convert zone id to string - insufficient buffer space", Logger::Error ); + g_log.log( m_myname + " startTransaction: Unable to convert zone id to string - insufficient buffer space", Logger::Error ); return false; } @@ -748,7 +748,7 @@ bool OdbxBackend::startTransaction( const DNSName& domain, int zoneid ) } catch ( std::exception& e ) { - L.log( m_myname + " startTransaction: Caught STL exception - " + e.what(), Logger::Error ); + g_log.log( m_myname + " startTransaction: Caught STL exception - " + e.what(), Logger::Error ); return false; } @@ -761,11 +761,11 @@ bool OdbxBackend::commitTransaction() { try { - DLOG( L.log( m_myname + " commitTransaction()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " commitTransaction()", Logger::Debug ) ); if( !m_handle[WRITE] && !connectTo( m_hosts[WRITE], WRITE ) ) { - L.log( m_myname + " commitTransaction: Master server is unreachable", Logger::Error ); + g_log.log( m_myname + " commitTransaction: Master server is unreachable", Logger::Error ); return false; } @@ -774,7 +774,7 @@ bool OdbxBackend::commitTransaction() } catch ( std::exception& e ) { - L.log( m_myname + " commitTransaction: Caught STL exception - " + e.what(), Logger::Error ); + g_log.log( m_myname + " commitTransaction: Caught STL exception - " + e.what(), Logger::Error ); return false; } @@ -787,11 +787,11 @@ bool OdbxBackend::abortTransaction() { try { - DLOG( L.log( m_myname + " abortTransaction()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " abortTransaction()", Logger::Debug ) ); if( !m_handle[WRITE] && !connectTo( m_hosts[WRITE], WRITE ) ) { - L.log( m_myname + " abortTransaction: Master server is unreachable", Logger::Error ); + g_log.log( m_myname + " abortTransaction: Master server is unreachable", Logger::Error ); return false; } @@ -800,7 +800,7 @@ bool OdbxBackend::abortTransaction() } catch ( std::exception& e ) { - L.log( m_myname + " abortTransaction: Caught STL exception - " + e.what(), Logger::Error ); + g_log.log( m_myname + " abortTransaction: Caught STL exception - " + e.what(), Logger::Error ); return false; } diff --git a/modules/opendbxbackend/odbxbackend.hh b/modules/opendbxbackend/odbxbackend.hh index 6ebaf5e35..550e93f20 100644 --- a/modules/opendbxbackend/odbxbackend.hh +++ b/modules/opendbxbackend/odbxbackend.hh @@ -165,7 +165,7 @@ public: OdbxLoader() { BackendMakers().report( &factory ); - L<< Logger::Info << "[opendbxbackend] This is the opendbx backend version " VERSION + g_log<< Logger::Info << "[opendbxbackend] This is the opendbx backend version " VERSION #ifndef REPRODUCIBLE << " (" __DATE__ " " __TIME__ ")" #endif diff --git a/modules/opendbxbackend/odbxprivate.cc b/modules/opendbxbackend/odbxprivate.cc index 43c564432..0cf96a06d 100644 --- a/modules/opendbxbackend/odbxprivate.cc +++ b/modules/opendbxbackend/odbxprivate.cc @@ -46,7 +46,7 @@ bool OdbxBackend::connectTo( const vector& hosts, QueryType type ) if( type == WRITE && getArg( "backend" ) == "sqlite" ) { - L.log( m_myname + " Using same SQLite connection for reading and writing to '" + hosts[odbx_host_index[READ]] + "'", Logger::Notice ); + g_log.log( m_myname + " Using same SQLite connection for reading and writing to '" + hosts[odbx_host_index[READ]] + "'", Logger::Notice ); m_handle[WRITE] = m_handle[READ]; return true; } @@ -59,15 +59,15 @@ bool OdbxBackend::connectTo( const vector& hosts, QueryType type ) { if( ( err = odbx_bind( m_handle[type], getArg( "database" ).c_str(), getArg( "username" ).c_str(), getArg( "password" ).c_str(), ODBX_BIND_SIMPLE ) ) == ODBX_ERR_SUCCESS ) { - L.log( m_myname + " Database connection (" + (type ? "write" : "read") + ") to '" + hosts[h] + "' succeeded", Logger::Notice ); + g_log.log( m_myname + " Database connection (" + (type ? "write" : "read") + ") to '" + hosts[h] + "' succeeded", Logger::Notice ); return true; } - L.log( m_myname + " Unable to bind to database on host " + hosts[h] + " - " + string( odbx_error( m_handle[type], err ) ), Logger::Error ); + g_log.log( m_myname + " Unable to bind to database on host " + hosts[h] + " - " + string( odbx_error( m_handle[type], err ) ), Logger::Error ); continue; } - L.log( m_myname + " Unable to connect to server on host " + hosts[h] + " - " + string( odbx_error( m_handle[type], err ) ), Logger::Error ); + g_log.log( m_myname + " Unable to connect to server on host " + hosts[h] + " - " + string( odbx_error( m_handle[type], err ) ), Logger::Error ); } m_handle[type] = NULL; @@ -81,13 +81,13 @@ bool OdbxBackend::execStmt( const char* stmt, unsigned long length, QueryType ty int err; - DLOG( L.log( m_myname + " execStmt()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " execStmt()", Logger::Debug ) ); - if( m_qlog ) { L.log( m_myname + " Query: " + stmt, Logger::Info ); } + if( m_qlog ) { g_log.log( m_myname + " Query: " + stmt, Logger::Info ); } if( ( err = odbx_query( m_handle[type], stmt, length ) ) < 0 ) { - L.log( m_myname + " execStmt: Unable to execute query - " + string( odbx_error( m_handle[type], err ) ), Logger::Error ); + g_log.log( m_myname + " execStmt: Unable to execute query - " + string( odbx_error( m_handle[type], err ) ), Logger::Error ); if( err != -ODBX_ERR_PARAM && odbx_error_type( m_handle[type], err ) > 0 ) { return false; } // ODBX_ERR_PARAM workaround if( !connectTo( m_hosts[type], type ) ) { return false; } @@ -106,13 +106,13 @@ bool OdbxBackend::getRecord( QueryType type ) int err = 3; - DLOG( L.log( m_myname + " getRecord()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " getRecord()", Logger::Debug ) ); do { if( err < 0 ) { - L.log( m_myname + " getRecord: Unable to get next result - " + string( odbx_error( m_handle[type], err ) ), Logger::Error ); + g_log.log( m_myname + " getRecord: Unable to get next result - " + string( odbx_error( m_handle[type], err ) ), Logger::Error ); throw( PDNSException( "Error: odbx_result() failed" ) ); } @@ -122,7 +122,7 @@ bool OdbxBackend::getRecord( QueryType type ) { if( ( err = odbx_row_fetch( m_result ) ) < 0 ) { - L.log( m_myname + " getRecord: Unable to get next row - " + string( odbx_error( m_handle[type], err ) ), Logger::Error ); + g_log.log( m_myname + " getRecord: Unable to get next row - " + string( odbx_error( m_handle[type], err ) ), Logger::Error ); throw( PDNSException( "Error: odbx_row_fetch() failed" ) ); } @@ -146,7 +146,7 @@ bool OdbxBackend::getRecord( QueryType type ) } } - L.log( m_myname + " Values: " + fields, Logger::Error ); + g_log.log( m_myname + " Values: " + fields, Logger::Error ); #endif return true; } @@ -171,11 +171,11 @@ string OdbxBackend::escape( const string& str, QueryType type ) unsigned long len = sizeof( m_escbuf ); - DLOG( L.log( m_myname + " escape(string)", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " escape(string)", Logger::Debug ) ); if( ( err = odbx_escape( m_handle[type], str.c_str(), str.size(), m_escbuf, &len ) ) < 0 ) { - L.log( m_myname + " escape(string): Unable to escape string - " + string( odbx_error( m_handle[type], err ) ), Logger::Error ); + g_log.log( m_myname + " escape(string): Unable to escape string - " + string( odbx_error( m_handle[type], err ) ), Logger::Error ); if( err != -ODBX_ERR_PARAM && odbx_error_type( m_handle[type], err ) > 0 ) { throw( runtime_error( "odbx_escape() failed" ) ); } // ODBX_ERR_PARAM workaround if( !connectTo( m_hosts[type], type ) ) { throw( runtime_error( "odbx_escape() failed" ) ); } @@ -194,7 +194,7 @@ bool OdbxBackend::getDomainList( const string& stmt, vector* list, b SOAData sd; - DLOG( L.log( m_myname + " getDomainList()", Logger::Debug ) ); + DLOG( g_log.log( m_myname + " getDomainList()", Logger::Debug ) ); if( !execStmt( stmt.c_str(), stmt.size(), READ ) ) { return false; } if( !getRecord( READ ) ) { return false; } diff --git a/modules/oraclebackend/oraclebackend.cc b/modules/oraclebackend/oraclebackend.cc index efcbad8fa..fd4e8d5e0 100644 --- a/modules/oraclebackend/oraclebackend.cc +++ b/modules/oraclebackend/oraclebackend.cc @@ -2155,7 +2155,7 @@ private: throw OracleException("Setting session pool get mode", oraerr); } } catch (OracleException &theException) { - L << Logger::Critical << "OracleFactory: " + g_log << Logger::Critical << "OracleFactory: " << theException.reason << endl; Cleanup(); throw theException; @@ -2176,7 +2176,7 @@ private: throw OracleException("OCISessionPoolDestroy", oraerr); } } catch (OracleException &theException) { - L << Logger::Error << "Failed to destroy Oracle session pool: " + g_log << Logger::Error << "Failed to destroy Oracle session pool: " << theException.reason << endl; } } @@ -2290,7 +2290,7 @@ public: OracleLoader() { BackendMakers().report(new OracleFactory); - L << Logger::Info << "[oraclebackend] This is the oracle backend version " VERSION + g_log << Logger::Info << "[oraclebackend] This is the oracle backend version " VERSION #ifndef REPRODUCIBLE << " (" __DATE__ " " __TIME__ ")" #endif diff --git a/modules/pipebackend/pipebackend.cc b/modules/pipebackend/pipebackend.cc index 1def45c21..33950ecac 100644 --- a/modules/pipebackend/pipebackend.cc +++ b/modules/pipebackend/pipebackend.cc @@ -77,7 +77,7 @@ void CoWrapper::launch() d_cp->send("HELO\t"+std::to_string(d_abiVersion)); string banner; d_cp->receive(banner); - L<match(qname.toStringRootDot())) { if(::arg().mustDo("query-logging")) - L<send(query.str()); } } catch(PDNSException &pe) { - L<send(query.str()); } catch(PDNSException &ae) { - L<send(oss.str()); } catch(PDNSException &ae) { - L<parts; stringtok(parts,line,"\t"); if(parts.empty()) { - L<writenWithTimeout(out.str().c_str(), out.str().size(), timeout); rv = 1; } catch (NetworkError& ne) { - L<writenWithTimeout(out.str().c_str(), out.str().size(), timeout); rv = 1; } catch (NetworkError& ne) { - L< -1) break; @@ -371,7 +371,7 @@ int HTTPConnector::send_message(const Json& input) { } freeaddrinfo(gAddr); } else { - L< optionsMap) { if (optionsMap.count("command") == 0) { - L<command = optionsMap.find("command")->second; @@ -123,7 +123,7 @@ void PipeConnector::launch() { this->send(msg); msg = nullptr; if (this->recv(msg)==false) { - L<send(value); } catch (PDNSException &ex) { - L<connector; @@ -93,9 +93,9 @@ bool RemoteBackend::recv(Json& value) { try { return connector->recv(value); } catch (PDNSException &ex) { - L<connector; @@ -605,7 +605,7 @@ void RemoteBackend::setNotified(uint32_t id, uint32_t serial) { Json answer; if (this->send(query) == false || this->recv(answer) == false) { - L< optionsMap) { if (optionsMap.count("path") == 0) { - L<timeout = 2000; @@ -48,7 +48,7 @@ UnixsocketConnector::UnixsocketConnector(std::map optio UnixsocketConnector::~UnixsocketConnector() { if (this->connected) { try { - L<(&sock), sizeof sock); if (rv != 0 && errno != EISCONN && errno != 0) { - L<send(msg); msg = nullptr; if (this->recv(msg) == false) { - L<connected = false; } diff --git a/modules/remotebackend/zmqconnector.cc b/modules/remotebackend/zmqconnector.cc index 1a96d49b0..a525d3365 100644 --- a/modules/remotebackend/zmqconnector.cc +++ b/modules/remotebackend/zmqconnector.cc @@ -30,7 +30,7 @@ ZeroMQConnector::ZeroMQConnector(std::map options) { // lookup timeout, target and stuff if (options.count("endpoint") == 0) { - L<d_endpoint = options.find("endpoint")->second; @@ -47,7 +47,7 @@ ZeroMQConnector::ZeroMQConnector(std::map options) { if(zmq_connect(this->d_sock, this->d_endpoint.c_str()) < 0) { - L< options) { this->send(msg); msg = nullptr; if (this->recv(msg)==false) { - L<0) { if(zmq_msg_send(&message, this->d_sock, 0) == -1) { // message was not sent - L<d_endpoint << ": " << zmq_strerror(errno)<d_endpoint << ": " << zmq_strerror(errno)<d_endpoint << ": " << ex.what()<d_endpoint << ": " << ex.what()<d_endpoint << ": " << err << endl; + g_log<d_endpoint << ": " << err << endl; break; } else if (errno == EAGAIN) { continue; // try again } } else { @@ -141,7 +141,7 @@ int ZeroMQConnector::recv_message(Json& output) { } } } catch (std::exception &ex) { - L<d_endpoint << ": " << ex.what()<d_endpoint << ": " << ex.what()<get(); TDIById_t::iterator itById = domain_index.find(id); if (itById == domain_index.end()) { - L<zone<<" to "<zone<<" to "< &extraConfigs) { // stat if (stat(params["include-dir"].c_str(), &st)) { - L << Logger::Error << params["include-dir"] << " does not exist!" << std::endl; + g_log << Logger::Error << params["include-dir"] << " does not exist!" << std::endl; throw ArgException(params["include-dir"] + " does not exist!"); } // wonder if it's accessible directory if (!S_ISDIR(st.st_mode)) { - L << Logger::Error << params["include-dir"] << " is not a directory" << std::endl; + g_log << Logger::Error << params["include-dir"] << " is not a directory" << std::endl; throw ArgException(params["include-dir"] + " is not a directory"); } if (!(dir = opendir(params["include-dir"].c_str()))) { - L << Logger::Error << params["include-dir"] << " is not accessible" << std::endl; + g_log << Logger::Error << params["include-dir"] << " is not accessible" << std::endl; throw ArgException(params["include-dir"] + " is not accessible"); } @@ -494,7 +494,7 @@ void ArgvMap::gatherIncludes(std::vector &extraConfigs) { namebuf << params["include-dir"].c_str() << "/" << ent->d_name; // FIXME: Use some path separator // ensure it's readable file if (stat(namebuf.str().c_str(), &st) || !S_ISREG(st.st_mode)) { - L << Logger::Error << namebuf.str() << " is not a file" << std::endl; + g_log << Logger::Error << namebuf.str() << " is not a file" << std::endl; closedir(dir); throw ArgException(namebuf.str() + " does not exist!"); } diff --git a/pdns/auth-carbon.cc b/pdns/auth-carbon.cc index e1025f169..391376300 100644 --- a/pdns/auth-carbon.cc +++ b/pdns/auth-carbon.cc @@ -75,7 +75,7 @@ try writen2WithTimeout(s.getHandle(), msg.c_str(), msg.length(), 2); } catch (runtime_error &e){ - L< *domains, bool include_disabled) { - DLOG(L<<"GSQLBackend retrieving all domains."<getRemote().toString() + "<-" + P->getRealRemote().toString(); else remote = P->getRemote().toString(); - L << Logger::Notice<<"Remote "<< remote <<" wants '" << P->qdomain<<"|"<qtype.getName() << + g_log << Logger::Notice<<"Remote "<< remote <<" wants '" << P->qdomain<<"|"<qtype.getName() << "', do = " <d_dnssecOk <<", bufsize = "<< P->getMaxReplyLen(); if(P->d_ednsRawPacketSizeLimit > 0 && P->getMaxReplyLen() != (unsigned int)P->d_ednsRawPacketSizeLimit) - L<<" ("<d_ednsRawPacketSizeLimit<<")"; - L<<": "; + g_log<<" ("<d_ednsRawPacketSizeLimit<<")"; + g_log<<": "; } if((P->d.opcode != Opcode::Notify && P->d.opcode != Opcode::Update) && P->couldBeCached()) { bool haveSomething=PC.get(P, &cached); // does the PacketCache recognize this question? if (haveSomething) { if(logDNSQueries) - L<<"packetcache HIT"<d_remote); // inlined cached.setSocket(P->getSocket()); // inlined cached.d_anyLocal = P->d_anyLocal; @@ -434,13 +434,13 @@ try if(distributor->isOverloaded()) { if(logDNSQueries) - L<<"Dropped query, backends are overloaded"<question(P, &sendout); // otherwise, give to the distributor @@ -453,7 +453,7 @@ try } catch(PDNSException& pe) { - L< &lists listset.insert(caIp.toStringWithPort()); } catch(PDNSException &e) { - L<d_iterations > maxNSEC3Iterations) { ns3p->d_iterations = maxNSEC3Iterations; - L<d_algorithm != 1) { - L<d_algorithm)<<"', setting to 1 for zone '"<d_algorithm)<<"', setting to 1 for zone '"<d_algorithm = 1; } } @@ -486,7 +486,7 @@ DNSSECKeeper::keyset_t DNSSECKeeper::getKeys(const DNSName& zone, bool useCache) dpk.d_flags = kd.flags; dpk.d_algorithm = dkrc.d_algorithm; if(dpk.d_algorithm == DNSSECKeeper::RSASHA1 && getNSEC3PARAM(zone)) { - L<DistributorSingleThreadDistributor::SingleThreadDistributor() { - L<MultiThreadDistributor(this)); Utility::usleep(50000); // we've overloaded mysql in the past :-) } - L<Q->replyPacket(); a->setRcode(RCode::ServFail); @@ -220,7 +220,7 @@ retry: delete QD->Q; } else { - L<Q->replyPacket(); a->setRcode(RCode::ServFail); @@ -237,7 +237,7 @@ retry: delete QD->Q; } else { - L<replyPacket(); a->setRcode(RCode::ServFail); S.inc("servfail-packets"); S.ringAccount("servfail-queries",q->qdomain.toLogString()); } else { - L<replyPacket(); a->setRcode(RCode::ServFail); S.inc("servfail-packets"); S.ringAccount("servfail-queries",q->qdomain.toLogString()); } else { - L<int MultiThreadDistributor< if(d_queued > d_maxQueueLength) { - L<BackendMakerClass::all(bool metadataOnly) } } catch(PDNSException &ae) { - L<::const_iterator i=ret.begin();i!=ret.end();++i) delete *i; throw; } catch(...) { // and cleanup - L<::const_iterator i=ret.begin();i!=ret.end();++i) delete *i; throw; @@ -249,14 +249,14 @@ bool DNSBackend::getSOA(const DNSName &domain, SOAData &sd, bool unmodifiedSeria } if(!unmodifiedSerial && !sd.serial) { // magic time! - DLOG(L<list(domain, sd.domain_id))) { - DLOG(L< > g_carbon; diff --git a/pdns/dnsdist.cc b/pdns/dnsdist.cc index 4f5dfd7ca..b87c5b3db 100644 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@ -2258,7 +2258,7 @@ try bindAny(cs->local.sin4.sin_family, cs->udpFD); // if (!setSocketTimestamps(cs->udpFD)) - // L<local)) { diff --git a/pdns/dnspacket.cc b/pdns/dnspacket.cc index 846e643cd..f81a21b6c 100644 --- a/pdns/dnspacket.cc +++ b/pdns/dnspacket.cc @@ -94,7 +94,7 @@ uint16_t DNSPacket::getRemotePort() const DNSPacket::DNSPacket(const DNSPacket &orig) { - DLOG(L<<"DNSPacket copy constructor called!"< content = std::dynamic_pointer_cast(i->first.d_content); if (!content) { - L< content = std::dynamic_pointer_cast(i->first.d_content); if (!content) { - L<getTSIGKey(*keyname, &tt.algo, &secret64)) { - L<qdomain<<"' denied: can't find TSIG key with name '"<<*keyname<<"' and algorithm '"<qdomain<<"' denied: can't find TSIG key with name '"<<*keyname<<"' and algorithm '"<d_mac, false); } catch(const std::runtime_error& err) { - L<qdomain<<"' denied: "<qdomain<<"' denied: "<id=id ^ d_xor; if(send(d_sock,&packet[0], packet.size() , 0)<0) { // zoom - L<second.createdsecond.created) { - L<second.remote.toStringWithPort()<<" with internal id "<second.complete; @@ -187,16 +187,16 @@ void DNSProxy::mainloop(void) len=recvfrom(d_sock, buffer, sizeof(buffer),0, (struct sockaddr*) &fromaddr, &fromaddrSize); // answer from our backend if(len<(ssize_t)sizeof(dnsheader)) { if(len<0) - L<second.qtype || p.qdomain != i->second.qname) { - L<second.qtype<<", "<second.qname<<")"<second.anyLocal.get_ptr(), 0); } if(sendmsg(i->second.outsock, &msgh, 0) < 0) - L<second.created=0; } } } catch(PDNSException &ae) { - L< #include diff --git a/pdns/dnsscan.cc b/pdns/dnsscan.cc index 2fb712e2f..703d9314d 100644 --- a/pdns/dnsscan.cc +++ b/pdns/dnsscan.cc @@ -28,8 +28,6 @@ #include "sstuff.hh" #include "anadns.hh" -// this is needed because boost multi_index also uses 'L', as do we (which is sad enough) -#undef L #include #include diff --git a/pdns/dnssecsigner.cc b/pdns/dnssecsigner.cc index 864d47374..af77f4132 100644 --- a/pdns/dnssecsigner.cc +++ b/pdns/dnssecsigner.cc @@ -74,7 +74,7 @@ static void fillOutRRSIG(DNSSECPrivateKey& dpk, const DNSName& signQName, RRSIGR WriteLock l(&g_signatures_lock); if(g_cacheweekno < weekno || g_signatures.size() >= (uint) maxcachesize) { // blunt but effective (C) Habbie, mind04 - L<&parts, Utility::pid_t ppid) if(parts[0]=="QUIT") { s_pleasequit=true; ret="Scheduling exit"; - L<&parts, Utility::pid_t ppid) return "Unable to convert '"+parts[2]+"' to an IP address"; } - L<&parts, Utility::pid_t ppid) return "syntax: notify domain"; if(!::arg().mustDo("master") && !::arg().mustDo("slave-renotify")) return "PowerDNS not configured as master or slave with re-notifications"; - L< domains; @@ -327,7 +327,7 @@ string DLRediscoverHandler(const vector&parts, Utility::pid_t ppid) { UeberBackend B; try { - L<&parts, Utility::pid_t ppid) { UeberBackend B; B.reload(); - L<&parts, Utility::pid_t ppid) string DLListZones(const vector&parts, Utility::pid_t ppid) { UeberBackend B; - L< domains; B.getAllDomains(&domains); ostringstream ret; diff --git a/pdns/dynlistener.cc b/pdns/dynlistener.cc index 8de1c191e..04bf537c1 100644 --- a/pdns/dynlistener.cc +++ b/pdns/dynlistener.cc @@ -71,9 +71,9 @@ void DynListener::createSocketAndBind(int family, struct sockaddr*local, size_t if(d_s < 0) { if (family == AF_UNIX) - L<sun_path<<"', reason: "<sun_path<<"', reason: "<toStringWithPort()<<"', reason: "<toStringWithPort()<<"', reason: "<sun_path<<"', reason: "<sun_path<<"', reason: "<toStringWithPort()<<"', reason: "<toStringWithPort()<<"', reason: "<(-1),Utility::makeGidNumeric(arg()["setgid"]))<0) - L<(p); us->theListener(); - L< fp=std::shared_ptr(fdopen(dup(d_client), "r"), fclose); if(d_tcp) { if(!fgets(&mesg[0], mesg.size(), fp.get())) { - L<(in)); } - catch(std::exception& e) { theL() <registerFunction("check",[](const cas_t& cas, const ComboAddress&ca) { return cas.count(ca)>0; }); d_lw->registerFunction("equal", [](const ComboAddress& lhs, const ComboAddress& rhs) { return ComboAddress::addressOnlyEqual()(lhs, rhs); }); @@ -189,7 +188,7 @@ void BaseLua4::prepareContext() { d_lw->registerFunction("changeContent", [](DNSRecord& dr, const std::string& newContent) { dr.d_content = shared_ptr(DNSRecordContent::mastermake(dr.d_type, 1, newContent)); }); // pdnsload - d_lw->writeFunction("pdnslog", [](const std::string& msg, boost::optional loglevel) { theL() << (Logger::Urgency)loglevel.get_value_or(Logger::Warning) << msg<writeFunction("pdnslog", [](const std::string& msg, boost::optional loglevel) { g_log << (Logger::Urgency)loglevel.get_value_or(Logger::Warning) << msg<readVariable>(dq.udpCallback).get_value_or(0); if(!cbFunc) { - theL()<d_rcode = RCode::FormErr; g_stats.serverParseError++; #ifdef HAVE_PROTOBUF @@ -287,7 +287,7 @@ int asyncresolve(const ComboAddress& ip, const DNSName& domain, int type, bool d return 1; // success - oddly enough } catch(...) { - L<::const_iterator j=nsset.begin();j!=nsset.end();++j) { vector nsips=fns.lookup(DNSName(*j), B); if(nsips.empty()) - L<::const_iterator k=nsips.begin();k!=nsips.end();++k) { const ComboAddress caIp(*k, 53); if(!d_preventSelfNotification || !AddressIsUs(caIp)) { if(!d_onlyNotify.match(&caIp)) - L<::const_iterator j=ips.begin();j!=ips.end();++j) { - L<::const_iterator j=alsoNotify.begin();j!=alsoNotify.end();++j) { try { const ComboAddress caIp(*j, 53); - L<1 ? "s" : "")<<" for which we are master need"<< + g_log<1 ? "s" : "")<<" for which we are master need"<< (cmdomains.size()>1 ? "" : "s")<< " notifications"<d_anyLocal) { addCMsgSrcAddr(&msgh, cbuf, p->d_anyLocal.get_ptr(), 0); } - DLOG(L<getRemote() <<" ("<< buffer.length()<<" octets)"<getRemote() <<" ("<< buffer.length()<<" octets)"< p->getMaxReplyLen()) { - L< "<getMaxReplyLen()< "<getMaxReplyLen()<getSocket(), &msgh, 0) < 0) - L< #include "dnsparser.hh" #include "iputils.hh" -#undef L #include #include diff --git a/pdns/nproxy.cc b/pdns/nproxy.cc index 705a1fce1..e79f8de75 100644 --- a/pdns/nproxy.cc +++ b/pdns/nproxy.cc @@ -25,7 +25,6 @@ #include #include "dnsparser.hh" #include "iputils.hh" -#undef L #include #include diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index 6f18b63d0..ad59c9f24 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -94,7 +94,7 @@ UeberBackend *PacketHandler::getBackend() PacketHandler::~PacketHandler() { --s_count; - DLOG(L< PacketHandler::getBestDNAMESynth(DNSPacket *p, SOAData& sd DNSName prefix; DNSName subdomain(target); do { - DLOG(L<<"Attempting DNAME lookup for "<domain_id && ::arg()["out-of-zone-additional-processing"]=="no") { - DLOG(L<dr.d_name<<" ("<dr.d_name<<" ("<qdomain, QType::NS, &nsset); } catch(ResolverException &re) { - L<qdomain<<" at: "<< remote <<": "<qdomain<<" at: "<< remote <<": "<qdomain<<" at: "<< remote <qdomain<<" at: "<< remote <qdomain<<" from potential supermaster "<qdomain<<" from potential supermaster "<qdomain, nsset, &nameserver, &account, &db)) { - L<qdomain<<" for potential supermaster "<qdomain<<" for potential supermaster "<qdomain<<" for potential supermaster "<qdomain<<" for potential supermaster "<qdomain<<"' from supermaster "<qdomain<<"' from supermaster "< meta; if(!::arg().mustDo("slave") && s_forwardNotify.empty()) { - L<qdomain<<" from "<getRemote()<<" but slave support is disabled in the configuration"<qdomain<<" from "<getRemote()<<" but slave support is disabled in the configuration"<d_remote ) || p->d_havetsig) { if (p->d_havetsig && p->getTSIGKeyname().empty() == false) { - L<qdomain<<" from "<getRemote()<<", allowed by TSIG key '"<getTSIGKeyname()<<"'"<qdomain<<" from "<getRemote()<<", allowed by TSIG key '"<getTSIGKeyname()<<"'"<qdomain<<" from "<getRemote()<<" but remote is not permitted by TSIG or allow-notify-from"<qdomain<<" from "<getRemote()<<" but remote is not permitted by TSIG or allow-notify-from"<qdomain, di) || !(db=di.backend)) { - L<qdomain<<" from "<getRemote()<<" for which we are not authoritative"<qdomain<<" from "<getRemote()<<" for which we are not authoritative"<getTSIGKeyname()); } @@ -829,30 +829,30 @@ int PacketHandler::processNotify(DNSPacket *p) if (B.getDomainMetadata(p->qdomain,"AXFR-MASTER-TSIG",meta) && meta.size() > 0) { if (!p->d_havetsig) { if (::arg().mustDo("allow-unsigned-notify")) { - L<qdomain<<" from "<getRemote()<<": permitted because allow-unsigned-notify"; + g_log<qdomain<<" from "<getRemote()<<": permitted because allow-unsigned-notify"; } else { - L<qdomain<<" from "<getRemote()<<": refused"<qdomain<<" from "<getRemote()<<": refused"<getTSIGKeyname().toStringNoDot()) { - L<qdomain<<" from "<getRemote()<<": expected TSIG key '"<getTSIGKeyname()<<"'"<qdomain<<" from "<getRemote()<<": expected TSIG key '"<getTSIGKeyname()<<"'"<getRemote().toString())) { - L<qdomain<<" from trusted-notification-proxy "<< p->getRemote()<qdomain<<" from trusted-notification-proxy "<< p->getRemote()<qdomain<<" does not have any masters defined"<qdomain<<" does not have any masters defined"<qdomain<<" from "<getRemote()<<" but we are master, rejecting"<qdomain<<" from "<getRemote()<<" but we are master, rejecting"<isMaster(p->qdomain, p->getRemote().toString())) { - L<qdomain<<" from "<getRemote()<<" which is not a master"<qdomain<<" from "<getRemote()<<" which is not a master"< forwardNotify(s_forwardNotify); for(set::const_iterator j=forwardNotify.begin();j!=forwardNotify.end();++j) { - L<qdomain<<" from "<getRemote()<<" to "<<*j<qdomain<<" from "<getRemote()<<" to "<<*j<qdomain,*j); } } @@ -1008,7 +1008,7 @@ bool PacketHandler::tryDNAME(DNSPacket *p, DNSPacket*r, SOAData& sd, DNSName &ta { if(!d_doDNAME) return false; - DLOG(L< rrset = getBestDNAMESynth(p, sd, target); if(!rrset.empty()) { for(auto& rr: rrset) { @@ -1029,7 +1029,7 @@ bool PacketHandler::tryWildcard(DNSPacket *p, DNSPacket*r, SOAData& sd, DNSName return false; if(rrset.empty()) { - DLOG(L<<"Wildcard matched something, but not of the correct type"<d.qr) { // QR bit from dns packet (thanks RA from N) if(d_logDNSDetails) - L<getRemote()<<", dropping"<getRemote()<<", dropping"<d_remote); return 0; @@ -1078,7 +1078,7 @@ DNSPacket *PacketHandler::doQuestion(DNSPacket *p) if(p->d.tc) { // truncated query. MOADNSParser would silently parse this packet in an incomplete way. if(d_logDNSDetails) - L<getRemote()<<", dropping"<getRemote()<<", dropping"<d_remote); return 0; @@ -1098,7 +1098,7 @@ DNSPacket *PacketHandler::doQuestion(DNSPacket *p) if(!p->checkForCorrectTSIG(&B, &keyname, &secret, &trc)) { r=p->replyPacket(); // generate an empty reply packet if(d_logDNSDetails) - L<d.opcode == Opcode::Update) r->setRcode(RCode::Refused); @@ -1110,7 +1110,7 @@ DNSPacket *PacketHandler::doQuestion(DNSPacket *p) if (p->d_tsig_algo == TSIG_GSS) { GssContext gssctx(keyname); if (!gssctx.getPeerPrincipal(p->d_peer_principal)) { - L<qdomain)) { if(d_logDNSDetails) - L<getRemote()<<", '"<qdomain<<"': sending servfail"<getRemote()<<", '"<qdomain<<"': sending servfail"<d_remote); S.inc("servfail-packets"); @@ -1162,13 +1162,13 @@ DNSPacket *PacketHandler::doQuestion(DNSPacket *p) return 0; } - L<d.opcode<<" from "<getRemote()<<" for "<qdomain<d.opcode<<" from "<getRemote()<<" for "<qdomain<setRcode(RCode::NotImp); return r; } - // L<qdomain<<"' "<qtype.getName()<<" from "<getRemote()<< " (tcp="<d_tcp<<")"<qdomain<<"' "<qtype.getName()<<" from "<getRemote()<< " (tcp="<d_tcp<<")"<qtype.getCode()==QType::IXFR) { r->setRcode(RCode::Refused); @@ -1205,7 +1205,7 @@ DNSPacket *PacketHandler::doQuestion(DNSPacket *p) retargeted:; if(retargetcount > 10) { // XXX FIXME, retargetcount++? - L<qdomain<<"'"<qdomain<<"'"<replyPacket(); r->setRcode(RCode::ServFail); @@ -1213,14 +1213,14 @@ DNSPacket *PacketHandler::doQuestion(DNSPacket *p) } if(!B.getAuth(target, p->qtype, &sd)) { - DLOG(L<setA(false); // drop AA if we never had a SOA in the first place r->setRcode(RCode::Refused); // send REFUSED - but only on empty 'no idea' } goto sendit; } - DLOG(L<getRemote()<getRemote()<setRcode(RCode::Refused); goto sendit; } - DLOG(L<<"Checking for referrals first, unless this is a DS query"<qtype.getCode() != QType::DS && tryReferral(p, r, sd, target, retargetcount)) goto sendit; - DLOG(L<<"Got no referrals, trying ANY"<qtype.getCode() == QType::A || p->qtype.getCode() == QType::AAAA || p->qtype.getCode() == QType::ANY)) { if (!d_doExpandALIAS) { - L<(rr.dr)->d_content; @@ -1332,33 +1332,33 @@ DNSPacket *PacketHandler::doQuestion(DNSPacket *p) } - DLOG(L<<"After first ANY query for '"<qtype.getCode() == QType::DS && weHaveUnauth && !weDone && !weRedirected && d_dk.isSecuredZone(sd.qname)) { - DLOG(L<<"Q for DS of a name for which we do have NS, but for which we don't have on a zone with DNSSEC need to provide an AUTH answer that proves we don't"<qtype.getCode() == QType::ANY)) { - DLOG(L<completePacket(r, haveAlias, target); return 0; } if(rrset.empty()) { - DLOG(L<<"checking qtype.getCode() ["<<(p->qtype.getCode())<<"] against QType::DS ["<<(QType::DS)<<"]"<qtype.getCode())<<"] against QType::DS ["<<(QType::DS)<<"]"<qtype.getCode() == QType::DS) { - DLOG(L<<"DS query found no direct result, trying referral now"<qdomain<<"|"<qtype.getCode()<<"): you have a trailing dot, this could be the problem (or run pdnsutil rectify-zone " <qdomain<<"|"<qtype.getCode()<<"): you have a trailing dot, this could be the problem (or run pdnsutil rectify-zone " <qdomain<<"|"<qtype.getCode()<<"): please run pdnsutil rectify-zone "<qdomain<<"|"<qtype.getCode()<<"): please run pdnsutil rectify-zone "<getMinTTL()); // in the packet cache } catch(DBException &e) { - L<replyPacket(); // generate an empty reply packet r->setRcode(RCode::ServFail); @@ -1457,11 +1457,11 @@ DNSPacket *PacketHandler::doQuestion(DNSPacket *p) S.ringAccount("servfail-queries",p->qdomain.toLogString()); } catch(PDNSException &e) { - L<qdomain<<"/"<qtype.getName()<<" ("<qdomain<<"/"<qtype.getName()<<" ("<replyPacket(); // generate an empty reply packet r->setRcode(RCode::ServFail); diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 4957393c9..79d3d85d1 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -339,7 +339,7 @@ static void handleGenUDPQueryResponse(int fd, FDMultiplexer::funcparam_t& var) ssize_t ret=recvfrom(fd, resp, sizeof(resp), 0, (sockaddr *)&fromaddr, &addrlen); if (fromaddr != pident.remote) { - L< size) { - L< *nearMissLimit) { - L< "<<*nearMissLimit<<") bogus answers for '"< "<<*nearMissLimit<<") bogus answers for '"<count(d_remote) && !(*t_tcpClientCounts)[d_remote]--) @@ -903,12 +903,12 @@ static void startDoResolve(void *p) if(!g_quiet || tracedQuery) { - L<getTid()<<"/"<numProcesses()<<"] " << (dc->d_tcp ? "TCP " : "") << "question for '"<d_mdp.d_qname<<"|" + g_log<getTid()<<"/"<numProcesses()<<"] " << (dc->d_tcp ? "TCP " : "") << "question for '"<d_mdp.d_qname<<"|" <d_mdp.d_qtype)<<"' from "<getRemote(); if(!dc->d_ednssubnet.source.empty()) { - L<<" (ecs "<d_ednssubnet.source.toString()<<")"; + g_log<<" (ecs "<d_ednssubnet.source.toString()<<")"; } - L<getTid()); @@ -971,7 +971,7 @@ static void startDoResolve(void *p) } catch(ImmediateServFailException &e) { if(g_logCommonErrors) - L<getRemote()<<" during resolve of '"<d_mdp.d_qname<<"' because: "<getRemote()<<" during resolve of '"<d_mdp.d_qname<<"' because: "<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<" for "<getRemote()<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<" for "<getRemote()<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<" for "<getRemote()<<" validates correctly"<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<" for "<getRemote()<<" validates correctly"<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<" for "<getRemote()<<" validates as Insecure"<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<" for "<getRemote()<<" validates as Insecure"<ad=0; } else if(state == Bogus) { if(g_dnssecLogBogus || sr.doLog() || g_dnssecmode == DNSSECMode::ValidateForLog) { - L<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<" for "<getRemote()<<" validates as Bogus"<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<" for "<getRemote()<<" validates as Bogus"<cd && (g_dnssecmode == DNSSECMode::ValidateAll || dc->d_mdp.d_header.ad || DNSSECOK)) { if(sr.doLog()) { - L<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<" because recursor or query demands it for Bogus results"<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<" because recursor or query demands it for Bogus results"<rcode=RCode::ServFail; goto sendit; } else { if(sr.doLog()) { - L<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<" Bogus validation since neither config nor query demands this"<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<" Bogus validation since neither config nor query demands this"<getRemote()<<" during validation of '"<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<"' because: "<getRemote()<<" during validation of '"<d_mdp.d_qname<<"|"<d_mdp.d_qtype).getName()<<"' because: "<rcode=RCode::ServFail; goto sendit; } @@ -1240,7 +1240,7 @@ static void startDoResolve(void *p) addCMsgSrcAddr(&msgh, cbuf, &dc->d_local, 0); } if(sendmsg(dc->d_socket, &msgh, 0) < 0 && g_logCommonErrors) - L<getRemote()<<" failed with: "<getRemote()<<" failed with: "<insertResponsePacket(dc->d_tag, dc->d_qhash, dc->d_mdp.d_qname, dc->d_mdp.d_qtype, dc->d_mdp.d_qclass, @@ -1266,11 +1266,11 @@ static void startDoResolve(void *p) bool hadError=true; if(wret == 0) - L<getRemote()<getRemote()<getRemote()<<": "<< strerror(errno) <getRemote()<<": "<< strerror(errno) <getRemote()<<" for "<d_mdp.d_qname<<" (size="<< (2 + packet.size()) <<", sent "<getRemote()<<" for "<d_mdp.d_qname<<" (size="<< (2 + packet.size()) <<", sent "<d_now); if(!g_quiet) { - L<getTid()<<"/"<numProcesses()<<"] answer to "<<(dc->d_mdp.d_header.rd?"":"non-rd ")<<"question '"<d_mdp.d_qname<<"|"<d_mdp.d_qtype); - L<<"': "<ancount)<<" answers, "<arcount)<<" additional, took "<getTid()<<"/"<numProcesses()<<"] answer to "<<(dc->d_mdp.d_header.rd?"":"non-rd ")<<"question '"<d_mdp.d_qname<<"|"<d_mdp.d_qtype); + g_log<<"': "<ancount)<<" answers, "<arcount)<<" additional, took "<d_mdp.d_qname<<", "<d_mdp.d_qname<<", "<getMaxStackUsage(), g_stats.maxMThreadStackUsage); @@ -1513,7 +1513,7 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) } if(!bytes || bytes < 0) { if(g_logCommonErrors) - L<d_remote.toStringWithPort() <<" disconnected after first byte"<d_remote.toStringWithPort() <<" disconnected after first byte"<removeReadFD(fd); return; } @@ -1521,7 +1521,7 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) else if(conn->state==TCPConnection::GETQUESTION) { ssize_t bytes=recv(conn->getFD(), conn->data + conn->bytesread, conn->qlen - conn->bytesread, 0); if(!bytes || bytes < 0 || bytes > std::numeric_limits::max()) { - L<d_remote.toStringWithPort() <<" disconnected while reading question body"<d_remote.toStringWithPort() <<" disconnected while reading question body"<removeReadFD(fd); return; } @@ -1536,7 +1536,7 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) catch(MOADNSException &mde) { g_stats.clientParseError++; if(g_logCommonErrors) - L<d_remote.toStringWithPort() <d_remote.toStringWithPort() <d_tcpConnection = conn; // carry the torch @@ -1587,14 +1587,14 @@ static void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var) } catch(const std::exception& e) { if(g_logCommonErrors) - L<d_mdp.d_header.qr) { g_stats.ignoredCount++; - L<getRemote() <<" on server socket!"<getRemote() <<" on server socket!"<d_mdp.d_header.opcode) { g_stats.ignoredCount++; - L<getRemote() <<" on server socket!"<getRemote() <<" on server socket!"<push_back(addr); if(t_allowFrom && !t_allowFrom->match(&addr)) { if(!g_quiet) - L<getTid()<<"] dropping TCP query from "<getTid()<<"] dropping TCP query from "<= sizeof(struct dnsheader)) { struct dnsheader tmpdh; @@ -1854,14 +1854,14 @@ static string* doProcessUDPQuestion(const std::string& question, const ComboAddr } } catch(std::exception& e) { - L<ipfilter(source, destination, *dh)) { if(!g_quiet) - L<getTid()<<"/"<numProcesses()<<"] DROPPED question from "<getTid()<<"/"<numProcesses()<<"] DROPPED question from "<numProcesses() > g_maxMThreads) { if(!g_quiet) - L<getTid()<<"/"<numProcesses()<<"] DROPPED question from "<getTid()<<"/"<numProcesses()<<"] DROPPED question from "<match(&fromaddr)) { if(!g_quiet) - L<getTid()<<"] dropping UDP query from "<getTid()<<"] dropping UDP query from "<getTid()<<"] dropping UDP query from "<getTid()<<"] dropping UDP query from "<qr) { g_stats.ignoredCount++; if(g_logCommonErrors) - L<opcode) { g_stats.ignoredCount++; if(g_logCommonErrors) - L<opcode<<" from "<opcode<<" from "<= 0) { if(i==locals.begin()) - L<(pleaseGetCacheMisses); if(g_stats.qcounter && (cacheHits + cacheMisses) && SyncRes::s_queries && SyncRes::s_outqueries) { - L<(pleaseGetCacheSize)<< " cache entries, "<< broadcastAccFunction(pleaseGetNegCacheSize)<<" negative entries, "<< (int)((cacheHits*100.0)/(cacheHits+cacheMisses))<<"% cache hits"<(pleaseGetThrottleSize) <<", ns speeds: " << broadcastAccFunction(pleaseGetNsSpeedsSize)<(pleaseGetConcurrentQueries)<<" queries running, "<(pleaseGetPacketCacheSize) << + g_log<(pleaseGetPacketCacheSize) << " packet cache entries, "<<(int)(100.0*broadcastAccFunction(pleaseGetPacketCacheHits)/SyncRes::s_queries) << "% packet cache hits"<wantAnswer) { if(write(g_pipes[t_id].writeFromThread, &resp, sizeof(resp)) != sizeof(resp)) { @@ -2502,10 +2502,10 @@ static void handleRCC(int fd, FDMultiplexer::funcparam_t& var) command(); } catch(std::exception& e) { - L<" : pident.domain.toString())<<", "<d_waiters.size()<<" waiters"<" : pident.domain.toString())<<", "<d_waiters.size()<<" waiters"<= 0) { @@ -2681,13 +2681,13 @@ FDMultiplexer* getMultiplexer() return ret; } catch(FDMultiplexerException &fe) { - L<= wantFDs) { setFilenumLimit(wantFDs); - L<addMask(line); } - L<size() <<" allow-from ranges from file '"<<::arg()["allow-from-file"]<<"' - overriding 'allow-from' setting"<size() <<" allow-from ranges from file '"<<::arg()["allow-from-file"]<<"' - overriding 'allow-from' setting"< ips; stringtok(ips, ::arg()["allow-from"], ", "); - L<::const_iterator i = ips.begin(); i!= ips.end(); ++i) { allowFrom->addMask(*i); if(i!=ips.begin()) - L< > parseCPUMap() const std::string value = ::arg()["cpu-map"]; if (!value.empty() && !isSettingThreadCPUAffinitySupported()) { - L< > parseCPUMap() } } catch(const std::exception& e) { - L< >& cpusMap, uns if (cpuMapping != cpusMap.cend()) { int rc = mapThreadToCPUList(tid, cpuMapping->second); if (rc == 0) { - L<second) { - L<second) { - L<= 0) - theL().setFacility(val); + g_log.setFacility(val); else - L< addrs; if(!::arg()["query-local-address6"].empty()) { SyncRes::s_doIPv6=true; - L<::const_iterator i = ips.begin(); i!= ips.end(); ++i) { SyncRes::addDontQuery(*i); if(i!=ips.begin()) - L< 65535){ - L< 65535 || port < s_minUdpSourcePort){ - L< 65535){ - L<(new boost::uuids::random_generator()); #endif - L<(); t_pdl->loadFile(::arg()["lua-dns-script"]); - L<getName() << "' multiplexer"<getName() << "' multiplexer"<addReadFD(g_pipes[t_id].readToThread, handlePipeRequest); @@ -3394,7 +3394,7 @@ try for(expired_t::iterator i=expired.begin() ; i != expired.end(); ++i) { shared_ptr conn=any_cast >(i->second); if(g_logCommonErrors) - L<d_remote.toStringWithPort() <d_remote.toStringWithPort() <removeReadFD(i->first); } } @@ -3434,15 +3434,15 @@ try } } catch(PDNSException &ae) { - L<= 3) // so you can't kill our errors - L.toConsole((Logger::Urgency)::arg().asNum("loglevel")); + g_log.toConsole((Logger::Urgency)::arg().asNum("loglevel")); //cerr<<"Backend: "<<::arg()["launch"]<<", '" << ::arg()["gmysql-dbname"] <<"'" <C_GetSlotList(CK_FALSE, NULL_PTR, &slots); if (err) { - L<Digest(msg, result, &mech)) { - L<reserve(zoneSizeHint); } } - theL()<setName(polName); loadRPZFromFile(filename, zone, defpol, maxTTL); lci.dfe.addZone(zone); - theL()<toString()<toString()<toString()<toString()<(dynamic_cast(DSRecordContent::make(what))); lci.dsAnchors[who].insert(*ds); }); broadcastAccFunction(boost::bind(pleaseWipePacketCache, who, true)); - L<((progname+"-instance").c_str())); @@ -254,7 +250,7 @@ static int guardian(int argc, char **argv) } newargv[n]=0; - L<0) { // parent @@ -299,8 +295,8 @@ static int guardian(int argc, char **argv) int ret=waitpid(pid,&status,WNOHANG); if(ret<0) { - L< static void tbhandler(int num) { - L<= 0) - theL().setFacility(val); + g_log.setFacility(val); else - L<(true); } catch(const PDNSException& e) { - L< #include "dnsrecords.hh" #include -#undef L #include #include #include @@ -42,7 +41,6 @@ #include "validate.hh" #undef max -#define L theL() #include "namespaces.hh" using namespace ::boost::multi_index; diff --git a/pdns/recursordist/test-syncres_cc.cc b/pdns/recursordist/test-syncres_cc.cc index 04f73ddc0..d63b4caaf 100644 --- a/pdns/recursordist/test-syncres_cc.cc +++ b/pdns/recursordist/test-syncres_cc.cc @@ -101,16 +101,16 @@ LuaConfigItems::LuaConfigItems() static void init(bool debug=false) { - L.setName("test"); - L.disableSyslog(true); + g_log.setName("test"); + g_log.disableSyslog(true); if (debug) { - L.setLoglevel((Logger::Urgency)(6)); // info and up - L.toConsole(Logger::Info); + g_log.setLoglevel((Logger::Urgency)(6)); // info and up + g_log.toConsole(Logger::Info); } else { - L.setLoglevel(Logger::None); - L.toConsole(Logger::Error); + g_log.setLoglevel(Logger::None); + g_log.toConsole(Logger::Error); } seedRandom("/dev/urandom"); diff --git a/pdns/reczones.cc b/pdns/reczones.cc index 52eaa8abc..364b710da 100644 --- a/pdns/reczones.cc +++ b/pdns/reczones.cc @@ -119,10 +119,10 @@ static void makeNameToIPZone(std::shared_ptr newMap, const ad.d_records.insert(dr); if(newMap->count(dr.d_name)) { - L< newMap, cons } if(newMap->count(dr.d_name)) { - L<::const_iterator iter = servers.begin(); iter != servers.end(); ++iter) { if(verbose && iter != servers.begin()) - L<<", "; + g_log<<", "; ComboAddress addr=parseIPAndPort(*iter, 53); if(verbose) - L< original=SyncRes::getDomainMap(); try { - L< parseAuthAndForwards() // headers.first=toCanonic("", headers.first); if(n==0) { ad.d_rdForward = false; - L< parseAuthAndForwards() } } else { - L< parseAuthAndForwards() } if(!::arg()["forward-zones-file"].empty()) { - L< parseAuthAndForwards() ad.d_name = DNSName(domain); (*newMap)[ad.d_name]=ad; } - L<size() - before<<" forwarding instructions from file '"<<::arg()["forward-zones-file"]<<"'"<size() - before<<" forwarding instructions from file '"<<::arg()["forward-zones-file"]<<"'"< parseAuthAndForwards() ifstream ifs(fname.c_str()); if(!ifs) { - L< parseAuthAndForwards() } } if(::arg().mustDo("serve-rfc1918")) { - L<d_type); if (rrType == QType::NSEC || rrType == QType::NSEC3) { - L<d_name<<"|"<d_name<<"|"<d_name<<"|"<d_name<<"|"<d_name != di->zone) { - L<d_name<<"|"<d_name<<"|"<d_class == QClass::IN) { // 3.4.2.2 QClass::IN means insert or update - DLOG(L<d_name<<"|"<d_name<<"|"<d_content->getZoneRepresentation(), di->zone.toString() /* FIXME400 huh */); *narrow = false; // adding a NSEC3 will cause narrow mode to be dropped, as you cannot specify that in a NSEC3PARAM record @@ -189,9 +189,9 @@ uint PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *rr, di->backend->replaceRRSet(di->id, oldRec->qname, oldRec->qtype, rrset); *updatedSerial = true; changedRecords++; - L<d_name<<"|"<d_name<<"|"< 0) { di->backend->replaceRRSet(di->id, rr->d_name, rrType, rrset); - L<d_name<<"|"<d_name<<"|"<d_name<<"|"<d_name<<"|"< 0) { di->backend->replaceRRSet(di->id, rr->d_name, rrType, rrset); - L<d_name<<"|"<d_name<<"|"<d_name<<"|"<d_name<<"|"<d_name<<"|"<d_name<<"|"<d_name); // always remove any ENT's in the place where we're going to add a record. auto newRec = DNSResourceRecord::fromWire(*rr); newRec.domain_id = di->id; @@ -345,7 +345,7 @@ uint PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *rr, // If we insert an NS, all the records below it become non auth - so, we're inserting a delegate. // Auth can only be false when the rr->d_name is not the zone if (auth == false && rrType == QType::NS) { - DLOG(L<d_name<d_name< qnames; di->backend->listSubZone(rr->d_name, di->id); @@ -383,10 +383,10 @@ uint PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *rr, // Delete records - section 3.4.2.3 and 3.4.2.4 with the exception of the 'always leave 1 NS rule' as that's handled by // the code that calls this performUpdate(). if ((rr->d_class == QClass::ANY || rr->d_class == QClass::NONE) && rrType != QType::SOA) { // never delete a SOA. - DLOG(L<d_name<<"; QClass:"<d_class<<"; rrType: "<d_name<<"; QClass:"<d_class<<"; rrType: "<d_class == QClass::ANY) d_dk.unsetNSEC3PARAM(rr->d_name); else if (rr->d_class == QClass::NONE) { @@ -462,7 +462,7 @@ uint PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *rr, if (recordsToDelete.size()) { di->backend->replaceRRSet(di->id, rr->d_name, rrType, rrset); - L<d_name<<"|"<d_name<<"|"<d_name<<"|"<d_name<<"|"< 0 || delnonterm.size() > 0) { - DLOG(L<backend->updateEmptyNonTerminals(di->id, insnonterm, delnonterm, false); for (const auto &i: insnonterm) { string hashed; @@ -581,18 +581,18 @@ int PacketHandler::forwardPacket(const string &msgPrefix, DNSPacket *p, DomainIn B.getDomainMetadata(p->qdomain, "FORWARD-DNSUPDATE", forward); if (forward.size() == 0 && ! ::arg().mustDo("forward-dnsupdate")) { - L<::const_iterator master=di->masters.begin(); master != di->masters.end(); master++) { - L<(recvRes) < sizeof(lenBuf)) { - L<(recvRes)); - L<d.id) + ") from " + p->getRemote().toString() + " for " + p->qdomain.toLogString() + ": "; - L<d_update_policy_lua == NULL) { @@ -730,7 +730,7 @@ int PacketHandler::processUpdate(DNSPacket *p) { ng.addMask(*i); if ( ! ng.match(&p->d_remote)) { - L<getTSIGDetails(&trc, &inputkey)) { - L<d_havetsig) - L<getString()); if (mdp.d_header.qdcount != 1) { - L<qtype.getCode() != QType::SOA) { // RFC2136 2.3 - ZTYPE must be SOA - L<qclass != QClass::IN) { - L<qdomain, di) || !di.backend) { - L<qdomain<<"' (or backend does not support DNS update operation)"<qdomain<<"' (or backend does not support DNS update operation)"<d_name.isPartOf(di.zone)) { - L<startTransaction(p->qdomain, -1)) { // Not giving the domain_id means that we do not delete the existing records. - L<qdomain<<" does not support transaction. Can't do Update packet."<qdomain<<" does not support transaction. Can't do Update packet."<d_place == DNSResourceRecord::ANSWER) { int res = checkUpdatePrerequisites(rr, &di); if (res>0) { - L<abortTransaction(); return res; } @@ -881,7 +881,7 @@ int PacketHandler::processUpdate(DNSPacket *p) { } } if (matchRR != foundRR || foundRR != vec->size()) { - L<abortTransaction(); return RCode::NXRRSet; } @@ -899,7 +899,7 @@ int PacketHandler::processUpdate(DNSPacket *p) { if (rr->d_place == DNSResourceRecord::AUTHORITY) { int res = checkUpdatePrescan(rr); if (res>0) { - L<abortTransaction(); return res; } @@ -931,7 +931,7 @@ int PacketHandler::processUpdate(DNSPacket *p) { } for (auto const &n : cn) { if (nocn.count(n) > 0) { - L<abortTransaction(); return RCode::FormErr; } @@ -944,10 +944,10 @@ int PacketHandler::processUpdate(DNSPacket *p) { /* see if it's permitted by policy */ if (this->d_update_policy_lua != NULL) { if (this->d_update_policy_lua->updatePolicy(rr->d_name, QType(rr->d_type), di.zone, p) == false) { - L<d_name << "/" << QType(rr->d_type).getName() << ": Not permitted by policy"<d_name << "/" << QType(rr->d_type).getName() << ": Not permitted by policy"<d_name << "/" << QType(rr->d_type).getName() << ": Permitted by policy"<d_name << "/" << QType(rr->d_type).getName() << ": Permitted by policy"<lookup(QType(QType::ANY), rr->d_name); while (di.backend->get(rec)) { if (rec.qtype != QType::CNAME && rec.qtype != QType::RRSIG) { - L<d_name << "/" << QType(rr->d_type).getName() << ": Data other than CNAME exists for the same name"<d_name << "/" << QType(rr->d_type).getName() << ": Data other than CNAME exists for the same name"<abortTransaction(); return RCode::Refused; } @@ -981,7 +981,7 @@ int PacketHandler::processUpdate(DNSPacket *p) { di.backend->lookup(QType(QType::CNAME), rr->d_name); while (di.backend->get(rec)) { if (rec.qtype == QType::CNAME && rr->d_type != QType::RRSIG) { - L<d_name << "/" << QType(rr->d_type).getName() << ": CNAME exists for the same name"<d_name << "/" << QType(rr->d_type).getName() << ": CNAME exists for the same name"<abortTransaction(); return RCode::Refused; } @@ -1013,7 +1013,7 @@ int PacketHandler::processUpdate(DNSPacket *p) { if (changedRecords > 0) { if (!di.backend->commitTransaction()) { - L<abortTransaction(); } return RCode::NoError; //rfc 2136 3.4.2.5 } catch (SSqlException &e) { - L<abortTransaction(); return RCode::ServFail; } catch (DBException &e) { - L<abortTransaction(); return RCode::ServFail; } catch (PDNSException &e) { - L<abortTransaction(); return RCode::ServFail; } catch(std::exception &e) { - L<abortTransaction(); return RCode::ServFail; } catch (...) { - L<abortTransaction(); return RCode::ServFail; } @@ -1076,7 +1076,7 @@ void PacketHandler::increaseSerial(const string &msgPrefix, const DomainInfo *di uint32_t oldSerial = sd.serial; if (oldSerial == 0) { // using Autoserial, leave the serial alone. - L<zone.toLogString()<<"\", not updating SOA serial."<zone.toLogString()<<"\", not updating SOA serial."<zone, soaEditSetting); if (soaEditSetting.empty()) { - L<zone.toLogString() <<"\". Using DEFAULT for SOA-EDIT-DNSUPDATE"<zone.toLogString() <<"\". Using DEFAULT for SOA-EDIT-DNSUPDATE"<backend->replaceRRSet(di->id, rr.qname, rr.qtype, vector(1, rr)); - L << Logger::Notice << msgPrefix << "Increasing SOA serial (" << oldSerial << " -> " << sd.serial << ")" << endl; + g_log << Logger::Notice << msgPrefix << "Increasing SOA serial (" << oldSerial << " -> " << sd.serial << ")" << endl; //Correct ordername + auth flag if (haveNSEC3) { diff --git a/pdns/rpzloader.cc b/pdns/rpzloader.cc index 97706088a..a135608f0 100644 --- a/pdns/rpzloader.cc +++ b/pdns/rpzloader.cc @@ -110,7 +110,7 @@ void RPZRecordToPolicy(const DNSRecord& dr, std::shared_ptr loadRPZFromServer(const ComboAddress& master, const DNSName& zoneName, std::shared_ptr zone, boost::optional defpol, uint32_t maxTTL, const TSIGTriplet& tt, size_t maxReceivedBytes, const ComboAddress& localAddress, uint16_t axfrTimeout) { - L< loadRPZFromServer(const ComboAddress& master, const throw PDNSException("Total AXFR time exceeded!"); } if(last != time(0)) { - L<getZoneRepresentation()<getZoneRepresentation()<d_st.serial, zone->size(), true); } catch(const std::exception& e) { - theL()<(dr)->d_st.serial<(dr)->d_st.serial<, vector > > deltas; ComboAddress local(localAddress); @@ -333,13 +333,13 @@ void RPZIXFRTracker(const ComboAddress& master, boost::optional oldZone = luaconfsLocal->dfe.getZone(zoneIdx); @@ -352,7 +352,7 @@ void RPZIXFRTracker(const ComboAddress& master, boost::optionalclear(); fullUpdate = true; } @@ -365,11 +365,11 @@ void RPZIXFRTracker(const ComboAddress& master, boost::optionald_st.serial<(rr); - // L<d_st.serial<d_st.serial<d_st.serial<d_st.serial<setSerial(sr->d_st.serial); setRPZZoneNewState(polName, sr->d_st.serial, newZone->size(), fullUpdate); diff --git a/pdns/secpoll-auth.cc b/pdns/secpoll-auth.cc index 646b29654..66656d5e2 100644 --- a/pdns/secpoll-auth.cc +++ b/pdns/secpoll-auth.cc @@ -63,19 +63,19 @@ void doSecPoll(bool first) else { string pkgv(PACKAGEVERSION); if(pkgv.find("0.0.") != 0) - L< doAxfr(const ComboAddress& raddr, const DNSName bool soa_received {false}; while(retriever.getChunk(recs)) { if(first) { - L< doAxfr(const ComboAddress& raddr, const DNSName continue; if(!i->qname.isPartOf(domain)) { - L<qname<<"'|"<qtype.getName()<<" during AXFR of zone '"<qname<<"'|"<qtype.getName()<<" during AXFR of zone '"< doAxfr(const ComboAddress& raddr, const DNSName for(DNSResourceRecord& rr : out) { if(!rr.qname.isPartOf(domain)) { - L<qname<<"'|"<qtype.getName()<<" during AXFR of zone '"<qname<<"'|"<qtype.getName()<<" during AXFR of zone '"<loadFile(script); - L< axfr; - L<startTransaction(domain, zs.domain_id); - L< maxent) { - L<abortTransaction(); } } catch(MOADNSException &re) { - L<abortTransaction(); } } catch(std::exception &re) { - L<abortTransaction(); } } catch(ResolverException &re) { - L<abortTransaction(); } } catch(PDNSException &ae) { - L<abortTransaction(); } } @@ -794,11 +794,11 @@ void CommunicatorClass::slaveRefresh(PacketHandler *P) if(dk.getTSIGForAccess(di.zone, sr.master, &dni.tsigkeyname)) { string secret64; if(!B->getTSIGKey(dni.tsigkeyname, &dni.tsigalgname, &secret64)) { - L<getDomainMetadata(di.zone, "AXFR-SOURCE", localaddr) && !localaddr.empty()) { try { dni.localaddr = ComboAddress(localaddr[0]); - L<1 ? "s" : "")<<" need"<< + g_log<1 ? "s" : "")<<" need"<< (sdomains.size()>1 ? "" : "s")<< " checking, "<getDomainInfo(di.zone, tempdi)) { - L< their serial "<< theirserial << endl; + g_log< their serial "<< theirserial << endl; di.backend->setFresh(di.id); } else if(theirserial == ourserial) { @@ -910,32 +910,32 @@ void CommunicatorClass::slaveRefresh(PacketHandler *P) } } if(! maxInception && ! ssr.d_freshness[di.id].theirInception) { - L<setFresh(di.id); } else if(maxInception == ssr.d_freshness[di.id].theirInception && maxExpire == ssr.d_freshness[di.id].theirExpire) { - L<setFresh(di.id); } else if(maxExpire >= now && ! ssr.d_freshness[di.id].theirInception ) { - L<setFresh(di.id); } else if(maxInception && ! ssr.d_freshness[di.id].theirInception ) { - L<inTransaction(); // try only once while(attempts < 2 && (d_rc = sqlite3_step(d_stmt)) == SQLITE_BUSY) attempts++; @@ -159,7 +159,7 @@ private: throw SSqlException(string("Unable to compile SQLite statement : '")+d_query+"': "+sqlite3_errmsg(d_db->db())); } if (pTail && strlen(pTail)>0) - L<& r for (const auto& server : s_resolversForStub) { msg += server.toString() + ", "; } - L<& r ret.push_back(zrr); } } - L<(this)); } @@ -265,13 +265,13 @@ void *TCPNameserver::doConnection(void *data) pthread_detach(pthread_self()); if(getpeername(fd, (struct sockaddr *)&remote, &remotelen) < 0) { - L<post(); try { closesocket(fd); } catch(const PDNSException& e) { - L< mesg(new char[mesgsize]); - DLOG(L<<"TCP Connection accepted on fd "< d_maxTransactionsPerConn) { - L << Logger::Notice<<"TCP Remote "<< remote <<" exceeded the number of transactions per connection, dropping."; + g_log << Logger::Notice<<"TCP Remote "<< remote <<" exceeded the number of transactions per connection, dropping."; break; } if (maxConnectionDurationReached(d_maxConnectionDuration, start, remainingTime)) { - L << Logger::Notice<<"TCP Remote "<< remote <<" exceeded the maximum TCP connection duration, dropping."; + g_log << Logger::Notice<<"TCP Remote "<< remote <<" exceeded the maximum TCP connection duration, dropping."; break; } @@ -309,12 +309,12 @@ void *TCPNameserver::doConnection(void *data) // do not remove this check as it will catch if someone // decreases the mesg buffer size for some reason. if(pktlen > mesgsize) { - L<getRemote().toString() + "<-" + packet->getRealRemote().toString(); else remote_text = packet->getRemote().toString(); - L << Logger::Notice<<"TCP Remote "<< remote_text <<" wants '" << packet->qdomain<<"|"<qtype.getName() << + g_log << Logger::Notice<<"TCP Remote "<< remote_text <<" wants '" << packet->qdomain<<"|"<qtype.getName() << "', do = " <d_dnssecOk <<", bufsize = "<< packet->getMaxReplyLen()<<": "; } if(packet->couldBeCached() && PC.get(packet.get(), cached.get())) { // short circuit - does the PacketCache recognize this question? if(logDNSQueries) - L<<"packetcache HIT"<setRemote(&packet->d_remote); cached->d.id=packet->d.id; cached->d.rd=packet->d.rd; // copy in recursion desired bit @@ -369,11 +369,11 @@ void *TCPNameserver::doConnection(void *data) continue; } if(logDNSQueries) - L<<"packetcache MISS"<post(); @@ -409,7 +409,7 @@ void *TCPNameserver::doConnection(void *data) closesocket(fd); } catch(const PDNSException& e) { - L< q) if (q->d_tsig_algo == TSIG_GSS) { GssContext gssctx(keyname); if (!gssctx.getPeerPrincipal(q->d_peer_principal)) { - L< q) s_P->getBackend()->getDomainMetadata(q->qdomain, "GSS-ALLOW-AXFR-PRINCIPAL", princs); for(const std::string& princ : princs) { if (q->d_peer_principal == princ) { - L<qdomain<<"' allowed: TSIG signed request with authorized principal '"<d_peer_principal<<"' and algorithm 'gss-tsig'"<qdomain<<"' allowed: TSIG signed request with authorized principal '"<d_peer_principal<<"' and algorithm 'gss-tsig'"<qdomain<<"' denied: TSIG signed request with principal '"<d_peer_principal<<"' and algorithm 'gss-tsig' is not permitted"<qdomain<<"' denied: TSIG signed request with principal '"<d_peer_principal<<"' and algorithm 'gss-tsig' is not permitted"<qdomain, keyname)) { - L<qdomain<<"' denied: key with name '"<d_tsig_algo)<<"' does not grant access to zone"<qdomain<<"' denied: key with name '"<d_tsig_algo)<<"' does not grant access to zone"<qdomain<<"' allowed: TSIG signed request with authorized key '"<d_tsig_algo)<<"'"<qdomain<<"' allowed: TSIG signed request with authorized key '"<d_tsig_algo)<<"'"<d_remote )) { - L<qdomain<<"' allowed: client IP "<getRemote()<<" is in allow-axfr-ips"<qdomain<<"' allowed: client IP "<getRemote()<<" is in allow-axfr-ips"< q) if(*k == q->getRemote().toString()) { // cerr<<"got AUTO-NS hit"<qdomain<<"' allowed: client IP "<getRemote()<<" is in NSset"<qdomain<<"' allowed: client IP "<getRemote()<<" is in NSset"< q) Netmask nm = Netmask(*i); if(nm.match( (ComboAddress *) &q->d_remote )) { - L<qdomain<<"' allowed: client IP "<getRemote()<<" is in per-domain ACL"<qdomain<<"' allowed: client IP "<getRemote()<<" is in per-domain ACL"< q) extern CommunicatorClass Communicator; if(Communicator.justNotified(q->qdomain, q->getRemote().toString())) { // we just notified this ip - L<qdomain<<"' from recently notified slave "<getRemote()<qdomain<<"' from recently notified slave "<getRemote()<qdomain<<"' denied: client IP "<getRemote()<<" has no permission"<qdomain<<"' denied: client IP "<getRemote()<<" has no permission"< q, int ou if(q->d_dnssecOk) outpacket->d_dnssecOk=true; // RFC 5936, 2.2.5 'SHOULD' - L<getRemote()<getRemote()<getRemote()<<" may not request AXFR"<getRemote()<<" may not request AXFR"<setRcode(RCode::NotAuth); sendPacket(outpacket,outsock); return 0; @@ -593,7 +593,7 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr q, int ou // canDoAXFR does all the ACL checks, and has the if(disable-axfr) shortcut, call it first. if(!s_P->getBackend()->getSOAUncached(target, sd)) { - L<setRcode(RCode::NotAuth); sendPacket(outpacket,outsock); return 0; @@ -602,7 +602,7 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr q, int ou UeberBackend db; if(!db.getSOAUncached(target, sd)) { - L<setRcode(RCode::NotAuth); sendPacket(outpacket,outsock); return 0; @@ -620,13 +620,13 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr q, int ou if(securedZone && dk.getNSEC3PARAM(target, &ns3pr, &narrow)) { NSEC3Zone=true; if(narrow) { - L<getRemote()<getRemote()<getRemote()<getRemote()<setRcode(RCode::Refused); // FIXME: should actually figure out if we are auth over a zone, and send out 9 if we aren't sendPacket(outpacket,outsock); @@ -647,11 +647,11 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr q, int ou if (algorithm != DNSName("gss-tsig")) { Lock l(&s_plock); if(!s_P->getBackend()->getTSIGKey(tsigkeyname, &algorithm, &tsig64)) { - L< q, int ou UeberBackend signatureDB; // SOA *must* go out first, our signing pipe might reorder - DLOG(L<<"Sending out SOA"<addRecord(soa); if(securedZone && !presignedZone) { @@ -757,7 +757,7 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr q, int ou // now start list zone if(!(sd.db->list(target, sd.domain_id))) { - L<setRcode(RCode::ServFail); sendPacket(outpacket,outsock); return 0; @@ -783,7 +783,7 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr q, int ou int ret1 = stubDoResolve(getRR(zrr.dr)->d_content, QType::A, ips); int ret2 = stubDoResolve(getRR(zrr.dr)->d_content, QType::AAAA, ips); if(ret1 != RCode::NoError || ret2 != RCode::NoError) { - L<getZoneRepresentation()<<", aborting AXFR"<getZoneRepresentation()<<", aborting AXFR"<setRcode(RCode::ServFail); sendPacket(outpacket,outsock); return 0; @@ -809,7 +809,7 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr q, int ou zrrs.push_back(zrr); } else { if (zrr.dr.d_type) - L< q, int ou while(shorter != target && shorter.chopOff()) { if(!qnames.count(shorter) && !nonterm.count(shorter) && nsec3set.count(shorter)) { if(!(maxent)) { - L< q, int ou udiff=dt.udiffNoReset(); if(securedZone) - L<addRecord(soa); @@ -1057,8 +1057,8 @@ int TCPNameserver::doAXFR(const DNSName &target, shared_ptr q, int ou sendPacket(outpacket, outsock); - DLOG(L<<"last packet - close"<getRemote()<<" finished"<getRemote()<<" finished"< q, int outsock) serial=pdns_stou(parts[2]); } catch(const std::out_of_range& oor) { - L<setRcode(RCode::FormErr); sendPacket(outpacket,outsock); return 0; } } else { - L<setRcode(RCode::FormErr); sendPacket(outpacket,outsock); return 0; } } else if (rr->d_type != QType::TSIG && rr->d_type != QType::OPT) { - L<d_type).getName()<d_type).getName()<setRcode(RCode::FormErr); sendPacket(outpacket,outsock); return 0; } } - L<qdomain<<"' initiated by "<getRemote()<<" with serial "<qdomain<<"' initiated by "<getRemote()<<" with serial "<getBackend()->getSOAUncached(q->qdomain, sd)) { - L<qdomain<<"' failed: not authoritative"<qdomain<<"' failed: not authoritative"<setRcode(RCode::NotAuth); sendPacket(outpacket,outsock); return 0; @@ -1129,8 +1129,8 @@ int TCPNameserver::doIXFR(shared_ptr q, int outsock) bool securedZone = dk.isSecuredZone(q->qdomain); if(dk.getNSEC3PARAM(q->qdomain, &ns3pr, &narrow)) { if(narrow) { - L<qdomain<<"' denied to "<getRemote()<qdomain<<"' denied to "<getRemote()<setRcode(RCode::Refused); sendPacket(outpacket,outsock); return 0; @@ -1141,7 +1141,7 @@ int TCPNameserver::doIXFR(shared_ptr q, int outsock) UeberBackend db; if(!db.getSOAUncached(target, sd)) { - L<setRcode(RCode::NotAuth); sendPacket(outpacket,outsock); return 0; @@ -1161,11 +1161,11 @@ int TCPNameserver::doIXFR(shared_ptr q, int outsock) algorithm = DNSName("hmac-md5"); Lock l(&s_plock); if(!s_P->getBackend()->getTSIGKey(tsigkeyname, &algorithm, &tsig64)) { - L< q, int outsock) UeberBackend signatureDB; // SOA *must* go out first, our signing pipe might reorder - DLOG(L<<"Sending out SOA"<addRecord(soa); if(securedZone) { @@ -1187,12 +1187,12 @@ int TCPNameserver::doIXFR(shared_ptr q, int outsock) sendPacket(outpacket, outsock); - L<getRemote()<<" finished"<getRemote()<<" finished"<qdomain, q, outsock); } @@ -1236,7 +1236,7 @@ TCPNameserver::TCPNameserver() int tmp=1; if(setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char*)&tmp,sizeof tmp)<0) { - L< lock(s_clientsCountMutex); if (s_clientsCount[remote] >= d_maxConnectionsPerClient) { - L<getValue( &room); if(room<1) - L<(fd))) { - L<post(); close(fd); decrementClientCount(remote); @@ -1392,10 +1392,10 @@ void TCPNameserver::thread() } } catch(PDNSException &AE) { - L<getTKEYRecord(&tkey_in, &name)) { - L<setRcode(RCode::FormErr); return; } diff --git a/pdns/ueberbackend.cc b/pdns/ueberbackend.cc index 9c299be55..3b7e3ff8f 100644 --- a/pdns/ueberbackend.cc +++ b/pdns/ueberbackend.cc @@ -60,12 +60,12 @@ pthread_cond_t UeberBackend::d_cond = PTHREAD_COND_INITIALIZER; //! Loads a module and reports it to all UeberBackend threads bool UeberBackend::loadmodule(const string &name) { - L<db = 0; sd->qname = shorter; goto found; } else if(cstat == 0 && d_negcache_ttl) { - DLOG(L< >::iterator j = bestmatch.begin(); for(; i != backends.end() && j != bestmatch.end(); ++i, ++j) { - DLOG(L<first < shorter.wirelength()) { - DLOG(L<second.qname<second.qname<first == shorter.wirelength()) { - DLOG(L<second.qname<second.qname<second; break; } else { - DLOG(L<getAuth(shorter, sd)) { - DLOG(L<qname<qname<first = sd->qname.wirelength(); j->second = *sd; if(sd->qname == shorter) { break; } } else { - DLOG(L<qname<qname<qname; d_question.zoneId = -1; @@ -348,10 +348,10 @@ bool UeberBackend::getAuth(const DNSName &target, const QType& qtype, SOAData* s found: if(found == (qtype == QType::DS) || target != shorter) { - DLOG(L<qname<qname<qname<qname< &rrs) } rrs.clear(); - // L< *ips) UeberBackend::~UeberBackend() { - DLOG(L<get(r))) { // this backend out of answers if(ibackends.size()) { - DLOG(L<<"Backend #"<backends.size() + DLOG(g_log<<"Backend #"<backends.size() <<" out of answers, taking next"<backends[i++]; @@ -661,15 +661,15 @@ bool UeberBackend::handle::get(DNSZoneRecord &r) else break; - DLOG(L<<"Now asking backend #"<backends.size()) { - DLOG(L<<"UeberBackend reached end of backends"<backends.size(); // don't go on to the next backend return true; } diff --git a/pdns/unix_semaphore.cc b/pdns/unix_semaphore.cc index 5257d861a..a4b25b6dd 100644 --- a/pdns/unix_semaphore.cc +++ b/pdns/unix_semaphore.cc @@ -150,7 +150,7 @@ Semaphore::Semaphore(unsigned int value) { m_pSemaphore=new sem_t; if (sem_init(m_pSemaphore, 0, value) == -1) { - theL() << Logger::Error << "Cannot create semaphore: " << stringerror() << endl; + g_log << Logger::Error << "Cannot create semaphore: " << stringerror() << endl; exit(1); } } diff --git a/pdns/unix_utility.cc b/pdns/unix_utility.cc index 5f5bb822c..e842374e5 100644 --- a/pdns/unix_utility.cc +++ b/pdns/unix_utility.cc @@ -84,22 +84,22 @@ void Utility::setBindAny(int af, sock_t sock) (void) one; // avoids 'unused var' warning on systems that have none of the defines checked below #ifdef IP_FREEBIND if (setsockopt(sock, IPPROTO_IP, IP_FREEBIND, &one, sizeof(one)) < 0) - theL()<pw_name, gid)<0) { - theL()<gr_gid; @@ -204,7 +204,7 @@ int Utility::makeUidNumeric(const string &username) if(!(newuid=atoi(username.c_str()))) { struct passwd *pw=getpwnam(username.c_str()); if(!pw) { - theL()<pw_uid; diff --git a/pdns/validate-recursor.cc b/pdns/validate-recursor.cc index 83e383328..329963131 100644 --- a/pdns/validate-recursor.cc +++ b/pdns/validate-recursor.cc @@ -13,7 +13,7 @@ bool checkDNSSECDisabled() { bool warnIfDNSSECDisabled(const string& msg) { if(g_dnssecmode == DNSSECMode::Off) { if (!msg.empty()) - L<body.empty()) { - L<body, err); if (doc.is_null()) { - L<headers["access-control-allow-origin"] = "*"; if (api_key.empty()) { - L<url.path << "\": Authentication failed, API Key missing in config" << endl; + g_log<url.path << "\": Authentication failed, API Key missing in config" << endl; throw HttpUnauthorizedException("X-API-Key"); } bool auth_ok = req->compareHeader("x-api-key", api_key) || req->getvars["api-key"]==api_key; if (!auth_ok) { - L<url.path << "\": Authentication by API Key failed" << endl; + g_log<url.path << "\": Authentication by API Key failed" << endl; throw HttpUnauthorizedException("X-API-Key"); } @@ -181,7 +181,7 @@ static void webWrapper(WebServer::HandlerFunction handler, HttpRequest* req, Htt if (!web_password.empty()) { bool auth_ok = req->compareAuthorization(web_password); if (!auth_ok) { - L<url.path << "\": Web Authentication failed" << endl; + g_log<url.path << "\": Web Authentication failed" << endl; throw HttpUnauthorizedException("Basic"); } } @@ -206,11 +206,11 @@ void WebServer::handleRequest(HttpRequest& req, HttpResponse& resp) const try { if (!req.complete) { - L<writenWithTimeout(reply.c_str(), reply.size(), timeout); } catch(PDNSException &e) { - L<d_local.toStringWithPort()<d_local.toStringWithPort()<getRemote(remote)) - L<go(); } catch(...) { - L<