if (settings->ReadSettings())
{
STG_LOGGER & WriteServLog = GetStgLogger();
+
if (settings->GetLogFileName() != "")
WriteServLog.SetLogFileName(settings->GetLogFileName());
+
WriteServLog("ReadSettings error. %s", settings->GetStrError().c_str());
exit(1);
}
{
rules = node->getValue(0);
}
-
+
if (strcasecmp(node->getName(), "DetailStatWritePeriod") == 0)
{
if (ParseDetailStatWritePeriod(node->getValue(0)) != 0)
}
}
- if (strcasecmp(node->getName(), "ScriptParams") == 0)
+ if (strcasecmp(node->getName(), "ScriptParams") == 0)
+ {
+ for (int i = 0; node->getValue(i) != NULL; ++i)
{
- for (int i = 0; node->getValue(i) != NULL; ++i)
- {
- scriptParams.push_back(node->getValue(i));
- }
+ scriptParams.push_back(node->getValue(i));
}
+ }
node = node->getNextNode();
}
const MODULE_SETTINGS & GetStoreModuleSettings() const
{ return storeModuleSettings; }
const std::vector<MODULE_SETTINGS> & GetModulesSettings() const
- { return modulesSettings; }
+ { return modulesSettings; }
const std::vector<std::string> & GetScriptParams() const { return scriptParams; }
private:
std::string rules;
std::string logFile;
std::string pidFile;
- std::string monitorDir;
+ std::string monitorDir;
std::vector<std::string> scriptParams;
bool monitoring;
unsigned detailStatWritePeriod;
bool reconnectOnTariffChange;
std::vector<MODULE_SETTINGS> modulesSettings;
- MODULE_SETTINGS storeModuleSettings;
+ MODULE_SETTINGS storeModuleSettings;
STG_LOGGER & logger;
};
//-----------------------------------------------------------------------------