more logging

This commit is contained in:
john30
2017-08-27 14:18:37 +02:00
parent a175bf567c
commit 2828ba6c77
2 changed files with 7 additions and 1 deletions
+3
View File
@@ -782,6 +782,7 @@ static bool readTemplates(const string path, const string extension, bool availa
return true;
}
string errorDescription;
logInfo(lf_main, "reading templates %s", path.c_str());
result_t result = templates->readFromFile(path+"/_templates"+extension, verbose, NULL, &errorDescription,
NULL, NULL, NULL);
if (result == RESULT_OK) {
@@ -817,6 +818,7 @@ static result_t readConfigFiles(const string& path, const string& extension, con
if (result != RESULT_OK) {
return result;
}
logInfo(lf_main, "successfully read file %s", name.c_str());
}
if (recursive) {
for (const auto& name : dirs) {
@@ -825,6 +827,7 @@ static result_t readConfigFiles(const string& path, const string& extension, con
if (result != RESULT_OK) {
return result;
}
logInfo(lf_main, "successfully read dir %s", name.c_str());
}
}
return RESULT_OK;
+4 -1
View File
@@ -149,7 +149,10 @@ MainLoop::MainLoop(const struct options& opt, Device *device, MessageMap* messag
m_htmlPath = opt.htmlPath;
m_network = new Network(opt.localOnly, opt.port, opt.httpPort, &m_netQueue);
m_network->start("network");
if (!datahandler_register(&m_userList, m_busHandler, messages, &m_dataHandlers)) {
logInfo(lf_main, "registering data handlers");
if (datahandler_register(&m_userList, m_busHandler, messages, &m_dataHandlers)) {
logInfo(lf_main, "registered data handlers");
} else {
logError(lf_main, "error registering data handlers");
}
}