]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
* Log infolog() messages in default verbosity mode (without -v flag) 3073/head
authorJan Broer <janeczku@yahoo.de>
Mon, 21 Dec 2015 23:08:51 +0000 (00:08 +0100)
committerJan Broer <janeczku@yahoo.de>
Sun, 27 Dec 2015 20:43:40 +0000 (21:43 +0100)
* Change some verbose logging calls from infolog to vinfolog

pdns/dnsdist-carbon.cc
pdns/dnsdist-web.cc
pdns/dnsrulactions.hh
pdns/dolog.hh

index a5130ec151f424cb8fd6f642e61593be7d9d4731..ca6274eb24c95b73eeb33f803db3bda37ac39319 100644 (file)
@@ -80,7 +80,7 @@ try
 
       int ret = waitForRWData(s.getHandle(), false, 1 , 0); 
       if(ret <= 0 ) {
-       infolog("Unable to write data to carbon server on %s: %s", localCarbon->server.toStringWithPort(), (ret<0 ? strerror(errno) : "Timeout"));
+       vinfolog("Unable to write data to carbon server on %s: %s", localCarbon->server.toStringWithPort(), (ret<0 ? strerror(errno) : "Timeout"));
        continue;
       }
       s.setBlocking();
index 72ee3d06b0f9fe76290fb9c1e6327a86ad719ed3..ffef89bcc70aa48a8a65173c123bd1aa57eb98e8 100644 (file)
@@ -38,7 +38,7 @@ bool compareAuthorization(YaHTTP::Request& req, const string &expected_password)
 static void connectionThread(int sock, ComboAddress remote, string password)
 {
   using namespace json11;
-  infolog("Webserver handling connection from %s", remote.toStringWithPort());
+  vinfolog("Webserver handling connection from %s", remote.toStringWithPort());
   FILE* fp=0;
   fp=fdopen(sock, "r");
   try {
index 21fe32ea431e6baa1fa4f6ea8d11a9b071a03325..d23cf843fca6e114ef15549858c9aa759d6bdf55 100644 (file)
@@ -429,7 +429,7 @@ public:
   DNSAction::Action operator()(const ComboAddress& remote, const DNSName& qname, uint16_t qtype, dnsheader* dh, uint16_t& len, string* ruleresult) const override
   {
     if(!d_fp) 
-      infolog("Packet from %s for %s %s with id %d", remote.toStringWithPort(), qname.toString(), QType(qtype).getName(), dh->id);
+      vinfolog("Packet from %s for %s %s with id %d", remote.toStringWithPort(), qname.toString(), QType(qtype).getName(), dh->id);
     else {
       string out = qname.toDNSString();
       fwrite(out.c_str(), 1, out.size(), d_fp);
index a7eea0b4dc1dc3f29129d8305c02874a19d7740d..eb988232edf6a352e91ca6c009cc0ff81ae074ff 100644 (file)
 
    Usage: 
           string address="localhost";
+          vinfolog("Got TCP connection from %s", remote);
           infolog("Bound to %s port %d", address, port);
           warnlog("Query took %d milliseconds", 1232.4); // yes, %d
           errlog("Unable to bind to %s: %s", ca.toStringWithPort(), strerr(errno));
 
    If bool g_console is true, will log to stdout. Will syslog in any case with LOG_INFO,
-   LOG_WARNING, LOG_ERR respectively. If g_verbose=false, infolog is a noop.
+   LOG_WARNING, LOG_ERR respectively. If g_verbose=false, vinfolog is a noop.
    More generically, dolog(someiostream, "Hello %s", stream) will log to someiostream
 
    This will happily print a string to %d! Doesn't do further format processing.
@@ -64,8 +65,7 @@ void genlog(int level, const char* s, Args... args)
 template<typename... Args>
 void infolog(const char* s, Args... args)
 {
-  if(g_verbose)
-    genlog(LOG_INFO, s, args...);
+  genlog(LOG_INFO, s, args...);
 }
 
 template<typename... Args>