]> granicus.if.org Git - pdns/commitdiff
Cleanup backend reporting when module is loaded
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Thu, 17 Jul 2014 18:43:53 +0000 (20:43 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Thu, 17 Jul 2014 18:43:53 +0000 (20:43 +0200)
Log everything at the same severity,
in the same way.

17 files changed:
modules/bindbackend/bindbackend2.cc
modules/db2backend/DB2Backend.cc
modules/geobackend/geobackend.hh
modules/gmysqlbackend/gmysqlbackend.cc
modules/goraclebackend/goraclebackend.cc
modules/gpgsqlbackend/gpgsqlbackend.cc
modules/gsqlite3backend/gsqlite3backend.cc
modules/ldapbackend/ldapbackend.cc
modules/lmdbbackend/lmdbbackend.cc
modules/luabackend/luabackend.cc
modules/mydnsbackend/mydnsbackend.cc
modules/opendbxbackend/odbxbackend.hh
modules/pipebackend/pipebackend.cc
modules/randombackend/randombackend.cc
modules/remotebackend/remotebackend.cc
modules/tinydnsbackend/tinydnsbackend.cc
pdns/docs/pdns.xml

index 20556208f5b0d5c41e7aa1540a6ec2f9d2f824d4..0e934e136f96a133224234fe3f85e1bcf87fa862 100644 (file)
@@ -1341,7 +1341,7 @@ public:
   Bind2Loader()
   {
     BackendMakers().report(new Bind2Factory);
-    L<<Logger::Notice<<"[Bind2Backend] This is the bind backend version "VERSION" ("__DATE__", "__TIME__") reporting"<<endl;
+    L << Logger::Info << "[bind2backend] This is the bind backend version " VERSION " (" __DATE__ ", " __TIME__ ") reporting" << endl;
   }
 };
 static Bind2Loader bind2loader;
index 8c3a9986aecf9a955f82a15d16c5eb3964136cdf..19cb3a5b96d5082d27ee70c8a0d0e40b1bee9e8d 100644 (file)
@@ -616,7 +616,7 @@ class DB2Loader
       Loader()
       {
          BackendMakers().report(new DB2Factory);
-         L << Logger::Notice << kBackendName << " This is the DB2 module version "VERSION" ("__DATE__", "__TIME__") reporting" << endl;
+         L << Logger::Info << "[db2backend] This is the db2 backend version " VERSION " (" __DATE__ ", " __TIME__ ") reporting" << endl;
       }
 };
 
index 5509982cbe59c74f240a65ff7a9ea6e39b0fd889..2be48f52b3a5ec5a11f3ff8d535631eb6f4d1bf1 100644 (file)
@@ -105,9 +105,7 @@ class GeoLoader {
 public:
         GeoLoader() {
                BackendMakers().report(new GeoFactory);
-               
-               L << Logger::Info << "[GeoBackend] This is the geobackend ("
-                       __DATE__", "__TIME__" - $Revision: 1.1 $) reporting" << endl;
+               L << Logger::Info << "[geobackend] This is the geo backend version " VERSION " (" __DATE__ ", " __TIME__ ") reporting" << endl;
         }
 };
 
index 50abc56908fe1bce49f639ca10cde3d6d2e29f2d..c73cedae44f4ceba3bac150c725cfbd3a96dd431 100644 (file)
@@ -142,7 +142,7 @@ public:
   gMySQLLoader()
   {
     BackendMakers().report(new gMySQLFactory("gmysql"));
-    L<<Logger::Warning<<"This is module gmysqlbackend.so reporting"<<endl;
+    L << Logger::Info << "[gmysqlbackend] This is the gmysql backend version " VERSION " (" __DATE__ ", " __TIME__ ") reporting" << endl;
   }
 };
 static gMySQLLoader gmysqlloader;
index 741dbe7a2f7e1dc2c9b4c856182185eed0e6717a..d6ae9b017b01c4d04afba51a055cddab383c27fd 100644 (file)
@@ -148,7 +148,7 @@ public:
   //! This reports us to the main UeberBackend class
   gOracleLoader() {
     BackendMakers().report(new gOracleFactory("goracle"));
-    L<<Logger::Warning<<"This is module goraclebackend reporting"<<endl;
+    L << Logger::Info << "[goraclebackend] This is the goracle backend version " VERSION " (" __DATE__ ", " __TIME__ ") reporting" << endl;
   }
 };
 
index 2a78b906d8e2795d54782c2554f84d1e5b35bc5a..d127cb4634d8541a192a6d447e59ad4528f3cd6b 100644 (file)
@@ -137,7 +137,7 @@ public:
   {
     BackendMakers().report(new gPgSQLFactory("gpgsql"));
     BackendMakers().report(new gPgSQLFactory("gpgsql2"));
-    L<<Logger::Warning<<"This is module gpgsqlbackend.so reporting"<<endl;
+    L << Logger::Info << "[gpgsqlbackend] This is the gpgsql backend version " VERSION " (" __DATE__ ", " __TIME__ ") reporting" << endl;
   }
 };
 static gPgSQLLoader gpgsqlloader;
index deb9b52b4a055a7d1d99d2141d96df9260d07689..c5b257766c4dd7273fdadfa9b0c5843dcbda1f80 100644 (file)
@@ -154,7 +154,7 @@ public:
   gSQLite3Loader()
   {
     BackendMakers().report( new gSQLite3Factory( "gsqlite3" ));
-    L<<Logger::Warning << "This is module gsqlite3 reporting" << std::endl;
+    L << Logger::Info << "[gsqlite3] This is the gsqlite3 backend version " VERSION " (" __DATE__ ", " __TIME__ ") reporting" << std::endl;
   }
 };
 
index 1649627999d9f425b5e765476b8a063ff52431ac..57d9899dae6ba9dcdd2bec5e638f2e23faae31cf 100644 (file)
@@ -564,7 +564,7 @@ public:
         LdapLoader()
         {
                BackendMakers().report( &factory );
-               L << Logger::Info << " [LdapBackend] This is the ldap module version "VERSION" ("__DATE__", "__TIME__") reporting" << endl;
+               L << Logger::Info << "[ldapbackend] This is the ldap backend version " VERSION " (" __DATE__ ", " __TIME__ ") reporting" << endl;
         }
 };
 
index 9820493a35ef34271021dab4ca3fc9b78c7c76ee..080d747dcc6c8563d557744cd102d1fd7b7d7caa 100644 (file)
@@ -537,8 +537,7 @@ public:
   LMDBLoader()
   {
     BackendMakers().report(new LMDBFactory);
-
-    L<<Logger::Info<<" [LMDBBackend] This is the LMDBBackend version ("__DATE__", "__TIME__") reporting"<<endl;
+    L << Logger::Info << "[lmdbbackend] This is the lmdb backend version " VERSION " (" __DATE__ ", " __TIME__ ") reporting" << endl;
   }
 };
 
index 3e4bf3ddc4fdd1356df419844b351bef6225d086..9391e6253df9f499a01beeaa6793659b2dc7ecc2 100644 (file)
@@ -49,7 +49,7 @@ public:
   {
     BackendMakers().report(new LUAFactory);
     
-    L<<Logger::Notice<<"[LUABackend] This is the luabackend ("__DATE__", "__TIME__") reporting"<<endl;
+    L << Logger::Info << "[luabackend] This is the lua backend version " VERSION " (" __DATE__ ", " __TIME__ ") reporting" << endl;
   }  
 };
 
index f3a04f480cbe538e5aae53a026f820f56e7530fd..579ac97d6eea1e0583910132a0363e2f46693cbb 100644 (file)
@@ -369,7 +369,7 @@ class MyDNSLoader {
 public:
         MyDNSLoader() {
                BackendMakers().report(new MyDNSFactory());
-               L<<Logger::Info<<backendName<<" This is the MyDNSBackend ("__DATE__", "__TIME__") reporting"<<endl;
+               L << Logger::Info << "[mydnsbackend] This is the mydns backend version " VERSION " (" __DATE__ ", " __TIME__ ") reporting" << endl;
         }
 };
 
index 54d016d76684e131b25ecd5523a7dc9b134bd9bb..56e4d0a8ece3c15a6dd5911035542d4788bedc65 100644 (file)
@@ -164,7 +164,7 @@ public:
         OdbxLoader()
         {
                BackendMakers().report( &factory );
-               L.log( " [OpendbxBackend] This is the opendbx module version "VERSION" ("__DATE__", "__TIME__") reporting", Logger::Info );
+               L.log( "[opendbxbackend] This is the opendbx backend version " VERSION " (" __DATE__ ", " __TIME__ ") reporting", Logger::Info );
         }
 };
 
index 8fcc8a864a307dbd8dab9761819f9898303ecf9c..9f256d1c568ef757f513113475d51666538559cb 100644 (file)
@@ -290,8 +290,7 @@ class PipeLoader
       PipeLoader()
       {
          BackendMakers().report(new PipeFactory);
-         
-         L<<Logger::Notice<<kBackendId<<" This is the pipebackend version "VERSION" ("__DATE__", "__TIME__") reporting"<<endl;
+         L << Logger::Info << kBackendId <<" This is the pipe backend version " VERSION " (" __DATE__ ", " __TIME__ ") reporting" << endl;
       }  
 };
 
index 3dc25ff7a284ada96c88ca69f941b67d7d5276e1..1244410a220045e554028822fed3855dd5238881 100644 (file)
@@ -26,6 +26,7 @@
 #include "pdns/dnspacket.hh"
 #include "pdns/pdnsexception.hh"
 #include "pdns/logger.hh"
+#include "pdns/version.hh"
 #include <boost/algorithm/string.hpp>
 
 /* FIRST PART */
@@ -99,8 +100,7 @@ public:
   RandomLoader()
   {
     BackendMakers().report(new RandomFactory);
-    
-    L<<Logger::Info<<" [RandomBackend] This is the randombackend version "VERSION" ("__DATE__", "__TIME__") reporting"<<endl;
+    L << Logger::Info << "[randombackend] This is the random backend version " VERSION " (" __DATE__ ", " __TIME__ ") reporting" << endl;
   }  
 };
 
index 508bf775b439c5f7489a72cec0c2f5463997dd9c..75a61d8d5ea9cb41ffdc08124f59ba7a3ffeec94 100644 (file)
@@ -1069,7 +1069,7 @@ public:
 
 RemoteLoader::RemoteLoader() {
     BackendMakers().report(new RemoteBackendFactory);
-    L<<Logger::Notice<<kBackendId<<" This is the remotebackend version "VERSION" ("__DATE__", "__TIME__") reporting"<<endl;
+    L << Logger::Info << kBackendId << " This is the remote backend version " VERSION " (" __DATE__ ", " __TIME__ ") reporting" << endl;
 }
 
 static RemoteLoader remoteloader;
index 8d7274f8a1a0264fae6a522a63bbc927bbab3328..a30177f52912939f0d24b2a1eac74b62c64f4034 100644 (file)
@@ -334,7 +334,7 @@ class TinyDNSLoader
 public:
        TinyDNSLoader() {
                BackendMakers().report(new TinyDNSFactory);
-               L<<Logger::Info<<" [TinyDNSBackend] This is the TinyDNSBackend ("__DATE__", "__TIME__") reporting"<<endl;
+               L << Logger::Info << " [tinydnsbackend] This is the tinydns backend version " VERSION " (" __DATE__ ", " __TIME__ ") reporting" << endl;
        }
 };
 
index df975a5a0422ec1c933f157c947cdad3e362938a..4b4cd606015b38b920bda0a37a621190359f1465 100644 (file)
@@ -23062,8 +23062,7 @@ public:
   RandomLoader()
   {
     BackendMakers().report(new RandomFactory);
-    
-    L&lt;&lt;Logger::Info&lt;&lt;" [RandomBackend] This is the randombackend ("__DATE__", "__TIME__") reporting"&lt;&lt;endl;
+    L &lt;&lt; Logger::Info &lt;&lt; "[randombackend] This is the random backend version " VERSION " reporting" &lt;&lt; endl;
   }  
 };