diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2008-04-29 14:12:15 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2008-04-29 14:12:15 -0230 |
commit | 2532cae1fa4d5893e90e938da376671c6e530b93 (patch) | |
tree | 079fcc63d3094ae272105bb9c94126b6d1ac30d8 /cpp/src/Ice/LoggerUtil.cpp | |
parent | Bug 2433 - new logger plugin mechanism (diff) | |
download | ice-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.cpp | 16 |
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() { } |