TraceLevels.cpp
Go to the documentation of this file.
1// **********************************************************************
2//
3// Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
4//
5// This copy of Ice is licensed to you under the terms described in the
6// ICE_LICENSE file included in this distribution.
7//
8// **********************************************************************
9
10#include <Ice/Properties.h>
12
13using namespace std;
14using namespace IceStorm;
15
16TraceLevels::TraceLevels(const string name,
17 const Ice::PropertiesPtr& properties,
18 const Ice::LoggerPtr& theLogger) :
19 topicMgr(0),
20 topicMgrCat("TopicManager"),
21 topic(0),
22 topicCat("Topic"),
23 subscriber(0),
24 subscriberCat("Subscriber"),
25 election(0),
26 electionCat("Election"),
27 replication(0),
28 replicationCat("Replication"),
29 logger(theLogger)
30{
31 const string keyBase = name + ".Trace.";
32 const_cast<int&>(topicMgr) = properties->getPropertyAsInt(keyBase + topicMgrCat);
33 const_cast<int&>(topic) = properties->getPropertyAsInt(keyBase + topicCat);
34 const_cast<int&>(subscriber) = properties->getPropertyAsInt(keyBase + subscriberCat);
35 const_cast<int&>(election) = properties->getPropertyAsInt(keyBase + electionCat);
36}
37
TraceLevels(const ::std::string name, const Ice::PropertiesPtr &, const Ice::LoggerPtr &)
const char * subscriberCat
Definition TraceLevels.h:34
const char * replicationCat
Definition TraceLevels.h:40
const char * topicCat
Definition TraceLevels.h:31
const char * electionCat
Definition TraceLevels.h:37
const Ice::LoggerPtr logger
Definition TraceLevels.h:42
const char * topicMgrCat
Definition TraceLevels.h:28
::IceInternal::Handle<::Ice::Properties > PropertiesPtr