diff options
author | Benoit Foucher <benoit@zeroc.com> | 2005-04-01 15:42:10 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2005-04-01 15:42:10 +0000 |
commit | f496752b90c2d5c9099b7dbca383bd30820a6ebd (patch) | |
tree | daba3e307aea127eccb2b1c50fe9353f18f1ca05 /cpp/src/IceGrid/TraceLevels.cpp | |
parent | ObjectNotExistException is now retried. (diff) | |
download | ice-f496752b90c2d5c9099b7dbca383bd30820a6ebd.tar.bz2 ice-f496752b90c2d5c9099b7dbca383bd30820a6ebd.tar.xz ice-f496752b90c2d5c9099b7dbca383bd30820a6ebd.zip |
Copied IcePack code to IceGrid.
Diffstat (limited to 'cpp/src/IceGrid/TraceLevels.cpp')
-rw-r--r-- | cpp/src/IceGrid/TraceLevels.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/cpp/src/IceGrid/TraceLevels.cpp b/cpp/src/IceGrid/TraceLevels.cpp new file mode 100644 index 00000000000..d2a4c6944c0 --- /dev/null +++ b/cpp/src/IceGrid/TraceLevels.cpp @@ -0,0 +1,50 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2005 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. +// +// ********************************************************************** + +#include <Ice/Properties.h> +#include <IceGrid/TraceLevels.h> + +using namespace std; +using namespace IceGrid; + +TraceLevels::TraceLevels(const Ice::PropertiesPtr& properties, const Ice::LoggerPtr& theLogger) : + server(0), + serverCat("Server"), + adapter(0), + adapterCat("Adapter"), + activator(0), + activatorCat("Activator"), + applicationRegistry(0), + applicationRegistryCat("ApplicationRegistry"), + serverRegistry(0), + serverRegistryCat("ServerRegistry"), + adapterRegistry(0), + adapterRegistryCat("AdapterRegistry"), + objectRegistry(0), + objectRegistryCat("ObjectRegistry"), + nodeRegistry(0), + nodeRegistryCat("NodeRegistry"), + logger(theLogger) +{ + const string nodeKeyBase = "IceGrid.Node.Trace."; + const_cast<int&>(server) = properties->getPropertyAsInt(nodeKeyBase + serverCat); + const_cast<int&>(adapter) = properties->getPropertyAsInt(nodeKeyBase + adapterCat); + const_cast<int&>(activator) = properties->getPropertyAsInt(nodeKeyBase + activatorCat); + + const string registryKeyBase = "IceGrid.Registry.Trace."; + const_cast<int&>(applicationRegistry) = properties->getPropertyAsInt(registryKeyBase + applicationRegistryCat); + const_cast<int&>(serverRegistry) = properties->getPropertyAsInt(registryKeyBase + serverRegistryCat); + const_cast<int&>(adapterRegistry) = properties->getPropertyAsInt(registryKeyBase + adapterRegistryCat); + const_cast<int&>(objectRegistry) = properties->getPropertyAsInt(registryKeyBase + objectRegistryCat); + const_cast<int&>(nodeRegistry) = properties->getPropertyAsInt(registryKeyBase + nodeRegistryCat); +} + +TraceLevels::~TraceLevels() +{ +} |