summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/LoggerUtil.cpp
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 /cpp/src/Ice/LoggerUtil.cpp
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 'cpp/src/Ice/LoggerUtil.cpp')
-rw-r--r--cpp/src/Ice/LoggerUtil.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/cpp/src/Ice/LoggerUtil.cpp b/cpp/src/Ice/LoggerUtil.cpp
index e015980c6d0..d6a534401e5 100644
--- a/cpp/src/Ice/LoggerUtil.cpp
+++ b/cpp/src/Ice/LoggerUtil.cpp
@@ -154,28 +154,28 @@ Ice::operator<<(Trace& out, ios_base& (*val)(ios_base&))
return out;
}
-Ice::IceLoggerPlugin::IceLoggerPlugin(const CommunicatorPtr& communicator,
- const LoggerPtr& logger)
+Ice::LoggerPlugin::LoggerPlugin(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)
+ if(logger == 0)
{
- instance->setLogger(logger);
+ throw PluginInitializationException(__FILE__, __LINE__, "Logger cannot be null");
}
+
+ IceInternal::InstancePtr instance = IceInternal::getInstance(communicator);
+ instance->setLogger(logger);
}
void
-Ice::IceLoggerPlugin::initialize()
+Ice::LoggerPlugin::initialize()
{
}
void
-Ice::IceLoggerPlugin::destroy()
+Ice::LoggerPlugin::destroy()
{
}