]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
retune loglevels for quiet=no query logging but also make sure we print those lines...
authorbert hubert <bert.hubert@netherlabs.nl>
Tue, 20 Jan 2015 20:01:32 +0000 (21:01 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Tue, 20 Jan 2015 20:01:32 +0000 (21:01 +0100)
pdns/pdns_recursor.cc

index f1a9c16bb1c804effb754e67467bd8c446eb5c10..8024e925358b437b02dc101e2a7757bbe2d0e9ea 100644 (file)
@@ -945,7 +945,7 @@ string* doProcessUDPQuestion(const std::string& question, const ComboAddress& fr
     uint32_t age;
     if(!SyncRes::s_nopacketcache && t_packetCache->getResponsePacket(question, g_now.tv_sec, &response, &age)) {
       if(!g_quiet)
-        L<<Logger::Error<<t_id<< " question answered from packet cache from "<<fromaddr.toString()<<endl;
+        L<<Logger::Notice<<t_id<< " question answered from packet cache from "<<fromaddr.toString()<<endl;
       // t_queryring->push_back("packetcached");
       
       g_stats.packetCacheHits++;
@@ -2334,6 +2334,8 @@ int main(int argc, char **argv)
     Logger::Urgency logUrgency = (Logger::Urgency)::arg().asNum("loglevel");
     if (logUrgency < Logger::Error)
       logUrgency = Logger::Error;
+    if(!g_quiet)
+      logUrgency = Logger::Info;
     L.setLoglevel(logUrgency);
     L.toConsole(logUrgency);