summaryrefslogtreecommitdiff
path: root/cppe/src/IceE/LoggerI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cppe/src/IceE/LoggerI.cpp')
-rw-r--r--cppe/src/IceE/LoggerI.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/cppe/src/IceE/LoggerI.cpp b/cppe/src/IceE/LoggerI.cpp
index 1f34b743adc..c01609b4071 100644
--- a/cppe/src/IceE/LoggerI.cpp
+++ b/cppe/src/IceE/LoggerI.cpp
@@ -8,12 +8,13 @@
// **********************************************************************
#include <IceE/LoggerI.h>
+#include <IceE/StaticMutex.h>
using namespace std;
using namespace Ice;
using namespace IceInternal;
-IceUtil::Mutex Ice::LoggerI::_globalMutex;
+static IceUtil::StaticMutex globalMutex = ICE_STATIC_MUTEX_INITIALIZER;
Ice::LoggerI::LoggerI(const string& prefix)
{
@@ -26,7 +27,7 @@ Ice::LoggerI::LoggerI(const string& prefix)
void
Ice::LoggerI::print(const string& message)
{
- IceUtil::Mutex::Lock sync(_globalMutex);
+ IceUtil::StaticMutex::Lock sync(globalMutex);
fprintf(stderr, "%s\n", message.c_str());
}
@@ -34,7 +35,7 @@ Ice::LoggerI::print(const string& message)
void
Ice::LoggerI::trace(const string& category, const string& message)
{
- IceUtil::Mutex::Lock sync(_globalMutex);
+ IceUtil::StaticMutex::Lock sync(globalMutex);
string s = "[ ";
s += _prefix;
@@ -56,13 +57,13 @@ Ice::LoggerI::trace(const string& category, const string& message)
void
Ice::LoggerI::warning(const string& message)
{
- IceUtil::Mutex::Lock sync(_globalMutex);
+ IceUtil::StaticMutex::Lock sync(globalMutex);
fprintf(stderr, "%swarning: %s\n", _prefix.c_str(), message.c_str());
}
void
Ice::LoggerI::error(const string& message)
{
- IceUtil::Mutex::Lock sync(_globalMutex);
+ IceUtil::StaticMutex::Lock sync(globalMutex);
fprintf(stderr, "%serror: %s\n", _prefix.c_str(), message.c_str());
}