summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/LoggerUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/LoggerUtil.cpp')
-rw-r--r--cpp/src/Ice/LoggerUtil.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/cpp/src/Ice/LoggerUtil.cpp b/cpp/src/Ice/LoggerUtil.cpp
index a57b749b701..e015980c6d0 100644
--- a/cpp/src/Ice/LoggerUtil.cpp
+++ b/cpp/src/Ice/LoggerUtil.cpp
@@ -9,6 +9,9 @@
#include <Ice/LoggerUtil.h>
#include <Ice/Logger.h>
+#include <Ice/Plugin.h>
+#include <Ice/LocalException.h>
+#include <Ice/Instance.h>
using namespace std;
using namespace Ice;
@@ -150,3 +153,29 @@ Ice::operator<<(Trace& out, ios_base& (*val)(ios_base&))
out.__str() << val;
return out;
}
+
+Ice::IceLoggerPlugin::IceLoggerPlugin(const CommunicatorPtr& communicator,
+ const LoggerPtr& logger)
+{
+ if(communicator == 0)
+ {
+ throw PluginInitializationException(__FILE__, __LINE__, "Communicator cannot be null");
+ }
+
+ IceInternal::InstancePtr instance = IceInternal::getInstance(communicator);
+
+ if(logger != 0)
+ {
+ instance->setLogger(logger);
+ }
+}
+
+void
+Ice::IceLoggerPlugin::initialize()
+{
+}
+
+void
+Ice::IceLoggerPlugin::destroy()
+{
+}