]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Add connection info to sql-connect message 787/head
authorRuben d'Arco <cyclops@prof-x.net>
Thu, 9 May 2013 14:59:50 +0000 (16:59 +0200)
committerRuben d'Arco <cyclops@prof-x.net>
Thu, 9 May 2013 14:59:50 +0000 (16:59 +0200)
This would help identify quickly which DB powerdns is connected to.

modules/gmysqlbackend/gmysqlbackend.cc
modules/gpgsqlbackend/gpgsqlbackend.cc

index ca398b221482d10c73df5d1936d1ffeae9407fd9..901f193a665ed67c4ce1a0a9da7da9a9f951f0f5 100644 (file)
@@ -30,7 +30,7 @@ gMySQLBackend::gMySQLBackend(const string &mode, const string &suffix)  : GSQLBa
     L<<Logger::Error<<mode<<" Connection failed: "<<e.txtReason()<<endl;
     throw AhuException("Unable to launch "+mode+" connection: "+e.txtReason());
   }
-  L<<Logger::Info<<mode<<" Connection successful"<<endl;
+  L<<Logger::Info<<mode<<" Connection successful. Connected to database '"<<getArg("dbname")<<"' on '"<<getArg("host")<<"'."<<endl;
 }
 
 class gMySQLFactory : public BackendFactory
index 08c522e985093e8c66a580abf6704cd82c0a7fd6..aae2528f06d0633e59996565412f3c287d1998cf 100644 (file)
@@ -30,7 +30,7 @@ gPgSQLBackend::gPgSQLBackend(const string &mode, const string &suffix)  : GSQLBa
     L<<Logger::Error<<mode<<" Connection failed: "<<e.txtReason()<<endl;
     throw AhuException("Unable to launch "+mode+" connection: "+e.txtReason());
   }
-  L<<Logger::Info<<mode<<" Connection successful"<<endl;
+  L<<Logger::Info<<mode<<" Connection successful. Connected to database '"<<getArg("dbname")<<"' on '"<<getArg("host")<<"'."<<endl;
 }
 
 class gPgSQLFactory : public BackendFactory