31 #include <boost/format.hpp>
32 #include <boost/filesystem/fstream.hpp>
34 #include "../logging/Logger.h"
35 #include "../logging/LoggerFactory.h"
43 using namespace rsc::logging;
50 = logging::LoggerFactory::getInstance().getLogger(
"rsc.config.configure()");
55 const string& configFileName,
56 const string& environmentVariablePrefix,
59 bool stripEnvironmentVariablePrefix,
60 const boost::filesystem::path& prefix) {
64 boost::filesystem::path
67 boost::filesystem::ifstream stream(prefixWideFile);
72 }
catch (
const runtime_error& e) {
74 "Failed to process prefix-wide configuration file `"
75 << prefixWideFile <<
"': " << e.what());
84 bool isUserConfigDirOK =
false;
86 boost::filesystem::ifstream
88 isUserConfigDirOK =
true;
93 }
catch (
const runtime_error& e) {
95 "Failed to process user-specific configuration file `"
98 :
"<failed to determine user config dir>")
99 <<
"': " << e.what());
104 boost::filesystem::ifstream stream(configFileName);
114 stripEnvironmentVariablePrefix);