summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/LoggerI.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2001-08-14 11:52:47 +0000
committerMarc Laukien <marc@zeroc.com>2001-08-14 11:52:47 +0000
commit91a394a09d9684d20cfa4c941cebb6b3579b9666 (patch)
treeeb99bdac118a23814e1dfcd8d4e5fc64a9c8f0cc /cpp/src/Ice/LoggerI.cpp
parentlocator (diff)
downloadice-91a394a09d9684d20cfa4c941cebb6b3579b9666.tar.bz2
ice-91a394a09d9684d20cfa4c941cebb6b3579b9666.tar.xz
ice-91a394a09d9684d20cfa4c941cebb6b3579b9666.zip
changed directory structure
Diffstat (limited to 'cpp/src/Ice/LoggerI.cpp')
-rw-r--r--cpp/src/Ice/LoggerI.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/cpp/src/Ice/LoggerI.cpp b/cpp/src/Ice/LoggerI.cpp
new file mode 100644
index 00000000000..94fe46eabd5
--- /dev/null
+++ b/cpp/src/Ice/LoggerI.cpp
@@ -0,0 +1,43 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/LoggerI.h>
+
+using namespace std;
+using namespace Ice;
+using namespace IceInternal;
+
+void
+Ice::LoggerI::trace(const string& category, const string& message)
+{
+ JTCSyncT<JTCMutex> sync(*this);
+ string s = "[ " + category + ": " + message + " ]";
+ string::size_type idx = 0;
+ while ((idx = s.find("\n", idx)) != string::npos)
+ {
+ s.insert(idx + 1, " ");
+ ++idx;
+ }
+ cerr << s << endl;
+}
+
+void
+Ice::LoggerI::warning(const string& message)
+{
+ JTCSyncT<JTCMutex> sync(*this);
+ cerr << "warning: " << message << endl;
+}
+
+void
+Ice::LoggerI::error(const string& message)
+{
+ JTCSyncT<JTCMutex> sync(*this);
+ cerr << "error: " << message << endl;
+}