Make ScopeTracker thread safe via TLS (thread local storage)
[libi2ncommon] / src / logfunc.cpp
index ba9f02f..8b1ce4f 100644 (file)
@@ -49,10 +49,6 @@ namespace I2n
 namespace Logger
 {
 
-/// Global lock for the logger. Used during all syslog operations
-/// and modification of our shared local variables.
-boost::recursive_mutex LoggerLock;
-
 /**
  * @brief the global logger instance.
  *
@@ -65,6 +61,10 @@ PartLogger GlobalLogger("");
 namespace
 {
 
+/// Global lock for the logger. Used during all syslog operations
+/// and modification of our shared local variables.
+static boost::recursive_mutex LoggerLock;
+
 /*
 ** local globals:
 */