From 2828ba6c776226fd25f6d42f804ab34f8f329dd6 Mon Sep 17 00:00:00 2001 From: john30 Date: Sun, 27 Aug 2017 14:18:37 +0200 Subject: [PATCH] more logging --- src/ebusd/main.cpp | 3 +++ src/ebusd/mainloop.cpp | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ebusd/main.cpp b/src/ebusd/main.cpp index ffec85da..e439230f 100644 --- a/src/ebusd/main.cpp +++ b/src/ebusd/main.cpp @@ -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; diff --git a/src/ebusd/mainloop.cpp b/src/ebusd/mainloop.cpp index 560e9288..206cf3e9 100644 --- a/src/ebusd/mainloop.cpp +++ b/src/ebusd/mainloop.cpp @@ -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"); } }