diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-12-20 14:34:35 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-12-20 14:34:35 +0000 |
commit | 269be23a39f6eb47140d61739f9d897ceda93601 (patch) | |
tree | 9f0f8ff5c523aca1c697539589a4f5444219154d /cpp/src/Ice/LoggerI.cpp | |
parent | Use Locale date format (diff) | |
download | ice-269be23a39f6eb47140d61739f9d897ceda93601.tar.bz2 ice-269be23a39f6eb47140d61739f9d897ceda93601.tar.xz ice-269be23a39f6eb47140d61739f9d897ceda93601.zip |
Remove Ice.Logger.DateFormat
Diffstat (limited to 'cpp/src/Ice/LoggerI.cpp')
-rw-r--r-- | cpp/src/Ice/LoggerI.cpp | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/cpp/src/Ice/LoggerI.cpp b/cpp/src/Ice/LoggerI.cpp index cd83067a25f..849ff249634 100644 --- a/cpp/src/Ice/LoggerI.cpp +++ b/cpp/src/Ice/LoggerI.cpp @@ -17,18 +17,12 @@ using namespace IceInternal; static IceUtil::StaticMutex outputMutex = ICE_STATIC_MUTEX_INITIALIZER; -Ice::LoggerI::LoggerI(const string& prefix, const string& dateFormat) : - _dateFormat(dateFormat) +Ice::LoggerI::LoggerI(const string& prefix) { if(!prefix.empty()) { _prefix = prefix + ": "; } - - if(_dateFormat == "0") - { - _dateFormat = ""; - } } void @@ -42,12 +36,7 @@ Ice::LoggerI::print(const string& message) void Ice::LoggerI::trace(const string& category, const string& message) { - string s = "[ "; - if(!_dateFormat.empty()) - { - s += IceUtil::Time::now().toDateTime(_dateFormat) + " "; - } - s += _prefix; + string s = "[ " + IceUtil::Time::now().toDateTime() + " " + _prefix; if(!category.empty()) { s += category + ": "; @@ -69,29 +58,15 @@ Ice::LoggerI::trace(const string& category, const string& message) void Ice::LoggerI::warning(const string& message) { - string s; - if(!_dateFormat.empty()) - { - s += IceUtil::Time::now().toDateTime(_dateFormat) + " "; - } - s += _prefix + "warning: " + message; - IceUtil::StaticMutex::Lock sync(outputMutex); - cerr << s << endl; + cerr << IceUtil::Time::now().toDateTime() << _prefix << "warning: " << message << endl; } void Ice::LoggerI::error(const string& message) { - string s; - if(!_dateFormat.empty()) - { - s += IceUtil::Time::now().toDateTime(_dateFormat) + " "; - } - s += _prefix + "error: " + message; - IceUtil::StaticMutex::Lock sync(outputMutex); - cerr << s << endl; + cerr << IceUtil::Time::now().toDateTime() << _prefix << "error: " << message << endl; } |