]> granicus.if.org Git - pdns/commitdiff
dnsdist: Only log YaHTTP's parser exceptions in verbose mode
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 13 May 2016 16:09:38 +0000 (18:09 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 13 May 2016 16:09:38 +0000 (18:09 +0200)
Log the remote client address in any case.

pdns/dnsdist-web.cc

index 0699f14b07432748722ed4cb8a420bd9d3c07ffe..f0cb43be8227615330e860993a3d9ecf703a2974 100644 (file)
@@ -400,13 +400,18 @@ static void connectionThread(int sock, ComboAddress remote, string password, str
     fclose(fp);
     fp=0;
   }
+  catch(const YaHTTP::ParseError& e) {
+    vinfolog("Webserver thread died with parse error exception while processing a request from %s: %s", remote.toStringWithPort(), e.what());
+    if(fp)
+      fclose(fp);
+  }
   catch(const std::exception& e) {
-    errlog("Webserver thread died with exception: %s", e.what());
+    errlog("Webserver thread died with exception while processing a request from %s: %s", remote.toStringWithPort(), e.what());
     if(fp)
       fclose(fp);
   }
   catch(...) {
-    errlog("Webserver thread died with exception");
+    errlog("Webserver thread died with exception while processing a request from %s", remote.toStringWithPort());
     if(fp)
       fclose(fp);
   }