diff options
author | Benoit Foucher <benoit@zeroc.com> | 2005-04-27 13:07:09 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2005-04-27 13:07:09 +0000 |
commit | dffd10d0118b84b62b3ae78392a4d52443cea45a (patch) | |
tree | 3e716604b0eaae8830c5857c510fe05237e7dc45 /cpp/src/IceGrid/TraceLevels.cpp | |
parent | Fixed http://www.zeroc.com/vbulletin/showthread.php?p=5727#post5727 (diff) | |
download | ice-dffd10d0118b84b62b3ae78392a4d52443cea45a.tar.bz2 ice-dffd10d0118b84b62b3ae78392a4d52443cea45a.tar.xz ice-dffd10d0118b84b62b3ae78392a4d52443cea45a.zip |
Added initial support for templates.
Diffstat (limited to 'cpp/src/IceGrid/TraceLevels.cpp')
-rw-r--r-- | cpp/src/IceGrid/TraceLevels.cpp | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/cpp/src/IceGrid/TraceLevels.cpp b/cpp/src/IceGrid/TraceLevels.cpp index d2a4c6944c0..39b71017c86 100644 --- a/cpp/src/IceGrid/TraceLevels.cpp +++ b/cpp/src/IceGrid/TraceLevels.cpp @@ -13,36 +13,28 @@ using namespace std; using namespace IceGrid; -TraceLevels::TraceLevels(const Ice::PropertiesPtr& properties, const Ice::LoggerPtr& theLogger) : +TraceLevels::TraceLevels(const Ice::PropertiesPtr& properties, const Ice::LoggerPtr& theLogger, bool isNode) : + application(0), + applicationCat("Application"), + node(0), + nodeCat("Node"), server(0), serverCat("Server"), adapter(0), adapterCat("Adapter"), + object(0), + objectCat("Object"), 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); + string keyBase = isNode ? "IceGrid.Node." : "IceGrid.Registry."; + const_cast<int&>(application) = properties->getPropertyAsInt(keyBase + applicationCat); + const_cast<int&>(node) = properties->getPropertyAsInt(keyBase + nodeCat); + const_cast<int&>(server) = properties->getPropertyAsInt(keyBase + serverCat); + const_cast<int&>(adapter) = properties->getPropertyAsInt(keyBase + adapterCat); + const_cast<int&>(object) = properties->getPropertyAsInt(keyBase + objectCat); + const_cast<int&>(activator) = properties->getPropertyAsInt(keyBase + activatorCat); } TraceLevels::~TraceLevels() |