From 2532cae1fa4d5893e90e938da376671c6e530b93 Mon Sep 17 00:00:00 2001 From: Dwayne Boone Date: Tue, 29 Apr 2008 14:12:15 -0230 Subject: Bug 2433 - changed logger plugin mechanism --- cpp/src/Ice/LoggerUtil.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'cpp/src/Ice/LoggerUtil.cpp') 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() { } -- cgit v1.2.3