summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/TraceLevels.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-09-04 19:39:59 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-09-04 19:39:59 +0000
commit1ce69fc8c36f2b7fa1d71ebe18e7ac4de01e3268 (patch)
treecd87f8121980159fdafd6b01e6802ea594478b93 /cpp/src/IceGrid/TraceLevels.cpp
parenticegridadmin always uses routed config if possible. added error messages if (diff)
downloadice-1ce69fc8c36f2b7fa1d71ebe18e7ac4de01e3268.tar.bz2
ice-1ce69fc8c36f2b7fa1d71ebe18e7ac4de01e3268.tar.xz
ice-1ce69fc8c36f2b7fa1d71ebe18e7ac4de01e3268.zip
Improved observers, refactored topic manager and initialization Added
icegridadmin commands to examine the registries
Diffstat (limited to 'cpp/src/IceGrid/TraceLevels.cpp')
-rw-r--r--cpp/src/IceGrid/TraceLevels.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/cpp/src/IceGrid/TraceLevels.cpp b/cpp/src/IceGrid/TraceLevels.cpp
index 67c4eb02383..5efd683a67b 100644
--- a/cpp/src/IceGrid/TraceLevels.cpp
+++ b/cpp/src/IceGrid/TraceLevels.cpp
@@ -7,13 +7,14 @@
//
// **********************************************************************
+#include <Ice/Communicator.h>
#include <Ice/Properties.h>
#include <IceGrid/TraceLevels.h>
using namespace std;
using namespace IceGrid;
-TraceLevels::TraceLevels(const Ice::PropertiesPtr& properties, const Ice::LoggerPtr& theLogger, bool isNode) :
+TraceLevels::TraceLevels(const Ice::CommunicatorPtr& communicator, const string& prefix) :
application(0),
applicationCat("Application"),
node(0),
@@ -34,9 +35,11 @@ TraceLevels::TraceLevels(const Ice::PropertiesPtr& properties, const Ice::Logger
locatorCat("Locator"),
session(0),
sessionCat("Session"),
- logger(theLogger)
+ logger(communicator->getLogger())
{
- string keyBase = isNode ? "IceGrid.Node.Trace." : "IceGrid.Registry.Trace.";
+ Ice::PropertiesPtr properties = communicator->getProperties();
+
+ string keyBase = prefix + ".Trace.";
const_cast<int&>(application) = properties->getPropertyAsInt(keyBase + applicationCat);
const_cast<int&>(node) = properties->getPropertyAsInt(keyBase + nodeCat);
const_cast<int&>(replica) = properties->getPropertyAsInt(keyBase + replicaCat);