Date: Thursday, December 21, 2006 @ 21:34:34
  Author: marc
    Path: /cvsroot/carob/carob

Modified: include/Common.hpp (1.49 -> 1.50) src/Common.cpp (1.49 -> 1.50)

Moved currentLogLevel from extern CarobNS:: to Common.cpp anonymous namespace


--------------------+
 include/Common.hpp |    2 --
 src/Common.cpp     |   16 +++++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)


Index: carob/include/Common.hpp
diff -u carob/include/Common.hpp:1.49 carob/include/Common.hpp:1.50
--- carob/include/Common.hpp:1.49       Tue Dec  5 12:06:10 2006
+++ carob/include/Common.hpp    Thu Dec 21 21:34:34 2006
@@ -123,8 +123,6 @@
  */
 extern wchar_t controllerDecimalPoint; 
 
-/** The current log level (set by setLogLevel) */
-extern LogLevel currentLogLevel;
 
 /** Sets the log level to l */
 void setLogLevel(const LogLevel l);
Index: carob/src/Common.cpp
diff -u carob/src/Common.cpp:1.49 carob/src/Common.cpp:1.50
--- carob/src/Common.cpp:1.49   Mon Dec  4 23:14:10 2006
+++ carob/src/Common.cpp        Thu Dec 21 21:34:34 2006
@@ -47,7 +47,9 @@
 #include <stdexcept>
 #include <locale>
 
-CarobNS::LogLevel CarobNS::currentLogLevel = LOG_LEVEL_WARN;
+namespace {
+  CarobNS::LogLevel currentLogLevel = CarobNS::LOG_LEVEL_WARN;
+}
 
 using std::wstring;
 using std::string;
@@ -93,7 +95,7 @@
   else if (l == LOG_LEVEL_OFF)
     logger->setLevel(log4cxx::Level::OFF);
 #endif
-  CarobNS::currentLogLevel = l;
+  currentLogLevel = l;
 }
 
 void CarobNS::logDebug(const wstring& fctName, const wstring& s)
@@ -160,23 +162,23 @@
 
 bool CarobNS::isDebugEnabled()
 {
-  return CarobNS::currentLogLevel <= LOG_LEVEL_DEBUG;
+  return currentLogLevel <= LOG_LEVEL_DEBUG;
 }
 bool CarobNS::isInfoEnabled()
 {
-  return CarobNS::currentLogLevel <= LOG_LEVEL_INFO;
+  return currentLogLevel <= LOG_LEVEL_INFO;
 }
 bool CarobNS::isWarnEnabled()
 {
-  return CarobNS::currentLogLevel <= LOG_LEVEL_WARN;
+  return currentLogLevel <= LOG_LEVEL_WARN;
 }
 bool CarobNS::isErrorEnabled()
 {
-  return CarobNS::currentLogLevel <= LOG_LEVEL_ERROR;
+  return currentLogLevel <= LOG_LEVEL_ERROR;
 }
 bool CarobNS::isFatalEnabled()
 {
-  return CarobNS::currentLogLevel <= LOG_LEVEL_FATAL;
+  return currentLogLevel <= LOG_LEVEL_FATAL;
 }
 
 wstring CarobNS::trim(const wstring& source, 

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to