summaryrefslogtreecommitdiff
path: root/java/src/Ice/LoggerPlugin.java
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2008-04-29 14:12:15 -0230
committerDwayne Boone <dwayne@zeroc.com>2008-04-29 14:12:15 -0230
commit2532cae1fa4d5893e90e938da376671c6e530b93 (patch)
tree079fcc63d3094ae272105bb9c94126b6d1ac30d8 /java/src/Ice/LoggerPlugin.java
parentBug 2433 - new logger plugin mechanism (diff)
downloadice-2532cae1fa4d5893e90e938da376671c6e530b93.tar.bz2
ice-2532cae1fa4d5893e90e938da376671c6e530b93.tar.xz
ice-2532cae1fa4d5893e90e938da376671c6e530b93.zip
Bug 2433 - changed logger plugin mechanism
Diffstat (limited to 'java/src/Ice/LoggerPlugin.java')
-rw-r--r--java/src/Ice/LoggerPlugin.java45
1 files changed, 45 insertions, 0 deletions
diff --git a/java/src/Ice/LoggerPlugin.java b/java/src/Ice/LoggerPlugin.java
new file mode 100644
index 00000000000..43d96aba8bd
--- /dev/null
+++ b/java/src/Ice/LoggerPlugin.java
@@ -0,0 +1,45 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+package Ice;
+
+public final class LoggerPlugin implements Ice.Plugin
+{
+ public
+ LoggerPlugin(Communicator communicator, Logger logger)
+ {
+ if(communicator == null)
+ {
+ PluginInitializationException ex = new PluginInitializationException();
+ ex.reason = "Communicator cannot be null";
+ throw ex;
+ }
+
+ if(logger == null)
+ {
+ PluginInitializationException ex = new PluginInitializationException();
+ ex.reason = "Logger cannot be null";
+ throw ex;
+ }
+
+ IceInternal.Instance instance = Util.getInstance(communicator);
+ instance.setLogger(logger);
+ }
+
+ public void
+ initialize()
+ {
+ }
+
+ public void
+ destroy()
+ {
+ }
+}
+