41 const std::string& filename)
52 for (ConfigSection::const_iterator i = configSection.begin();
53 i != configSection.end();
56 if (i->first ==
"user")
60 user = i->second.get_value<std::string>(
"user");
65 " in \"general\" section"));
68 catch (
const boost::property_tree::ptree_error& error)
71 " in \"general\" section"));
74 else if (i->first ==
"group")
78 group = i->second.get_value<std::string>(
"group");
83 " in \"general\" section"));
86 catch (
const boost::property_tree::ptree_error& error)
89 " in \"general\" section"));
93 NFD_LOG_TRACE(
"using user \"" << user <<
"\" group \"" << group <<
"\"");
void addSectionHandler(const std::string §ionName, ConfigSectionHandler subscriber)
setup notification of configuration file sections
configuration file parsing utility
void setConfigFile(ConfigFile &configFile)
static void onConfig(const ConfigSection &configSection, bool isDryRun, const std::string &filename)
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
boost::property_tree::ptree ConfigSection
a config file section
static void initialize(const std::string &userName, const std::string &groupName)
#define NFD_LOG_INIT(name)
#define NFD_LOG_TRACE(expression)