]> granicus.if.org Git - pdns/commitdiff
silence some common errors with log-common-errors=off
authorbert hubert <bert.hubert@netherlabs.nl>
Wed, 2 Mar 2016 14:00:15 +0000 (15:00 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Wed, 2 Mar 2016 14:03:12 +0000 (15:03 +0100)
pdns/pdns_recursor.cc

index 19cb2a42429047ddddd6067a7c76be367c02ceb4..3042f8e5deaca2fa93a185588a3de1b5d2f373b8 100644 (file)
@@ -1722,10 +1722,12 @@ void handlePipeRequest(int fd, FDMultiplexer::funcparam_t& var)
     resp = tmsg->func();
   }
   catch(std::exception& e) {
-    L<<Logger::Error<<"PIPE function we executed created exception: "<<e.what()<<endl; // but what if they wanted an answer.. we send 0
+    if(g_logCommonErrors)
+      L<<Logger::Error<<"PIPE function we executed created exception: "<<e.what()<<endl; // but what if they wanted an answer.. we send 0
   }
   catch(PDNSException& e) {
-    L<<Logger::Error<<"PIPE function we executed created PDNS exception: "<<e.reason<<endl; // but what if they wanted an answer.. we send 0
+    if(g_logCommonErrors)
+      L<<Logger::Error<<"PIPE function we executed created PDNS exception: "<<e.reason<<endl; // but what if they wanted an answer.. we send 0
   }
   if(tmsg->wantAnswer)
     if(write(g_pipes[t_id].writeFromThread, &resp, sizeof(resp)) != sizeof(resp))