// ********************************************************************** // // Copyright (c) 2003-2016 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 #include #include using namespace std; using namespace IceGrid; TraceLevels::TraceLevels(const Ice::CommunicatorPtr& communicator, const string& prefix) : application(0), applicationCat("Application"), node(0), nodeCat("Node"), replica(0), replicaCat("Replica"), server(0), serverCat("Server"), adapter(0), adapterCat("Adapter"), object(0), objectCat("Object"), activator(0), activatorCat("Activator"), patch(0), patchCat("Patch"), locator(0), locatorCat("Locator"), session(0), sessionCat("Session"), logger(communicator->getLogger()) { Ice::PropertiesPtr properties = communicator->getProperties(); string keyBase = prefix + ".Trace."; const_cast(application) = properties->getPropertyAsInt(keyBase + applicationCat); const_cast(node) = properties->getPropertyAsInt(keyBase + nodeCat); const_cast(replica) = properties->getPropertyAsInt(keyBase + replicaCat); const_cast(server) = properties->getPropertyAsInt(keyBase + serverCat); const_cast(adapter) = properties->getPropertyAsInt(keyBase + adapterCat); const_cast(object) = properties->getPropertyAsInt(keyBase + objectCat); const_cast(activator) = properties->getPropertyAsInt(keyBase + activatorCat); const_cast(patch) = properties->getPropertyAsInt(keyBase + patchCat); const_cast(locator) = properties->getPropertyAsInt(keyBase + locatorCat); const_cast(session) = properties->getPropertyAsInt(keyBase + sessionCat); } TraceLevels::~TraceLevels() { }