]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/logger.hh
Logging: have a global g_log
[thirdparty/pdns.git] / pdns / logger.hh
index 989c921fcfcbbe138bc8959c64d5b1fc4b581c52..5cd9e18e8eb5d0ae28e71f024f2baa6a2560a760 100644 (file)
@@ -70,9 +70,9 @@ public:
   void resetFlags(){flags=0;open();} //!< zero the flags
   /** Use this to stream to your log, like this:
       \code
-      L<<"This is an informational message"<<endl; // logged at default loglevel (Info)
-      L<<Logger::Warning<<"Out of diskspace"<<endl; // Logged as a warning 
-      L<<"This is an informational message"<<endl; // logged AGAIN at default loglevel (Info)
+      g_log<<"This is an informational message"<<endl; // logged at default loglevel (Info)
+      g_log<<Logger::Warning<<"Out of diskspace"<<endl; // Logged as a warning 
+      g_log<<"This is an informational message"<<endl; // logged AGAIN at default loglevel (Info)
       \endcode
   */
   Logger& operator<<(const char *s);
@@ -113,10 +113,10 @@ private:
   bool d_disableSyslog;
   bool d_timestamps{true};
   static pthread_once_t s_once;
-  static pthread_key_t s_loggerKey;
+  static pthread_key_t g_loggerKey;
 };
 
-extern Logger &theL(const string &pname="");
+extern Logger g_log;
 
 #ifdef VERBOSELOG
 #define DLOG(x) x