Adding some Log messages

This commit is contained in:
Johannes Wendel
2019-12-20 14:24:06 +01:00
parent 8d4efaa463
commit b70866b5b0
9 changed files with 16 additions and 13 deletions

View File

@@ -6,9 +6,7 @@
*/
#include <boost/thread.hpp>
#include "utility/config.h"
#include "EventNotifier.h"
namespace flippR_driver
@@ -72,10 +70,10 @@ void EventNotifier::notify()
// getting a guard and calling all registered handlers
std::lock_guard<std::mutex> event_handler_guard(this->event_handler_mutex);
CLOG(INFO, INPUT_LOGGER) << "Notified " << this->event_handlers.size() << " EventHandlers";
//CLOG(INFO, INPUT_LOGGER) << "Notified " << this->event_handlers.size() << " EventHandlers";
for(auto handler : this->event_handlers)
{
CLOG(INFO, INPUT_LOGGER) << "Notify " << handler;
//CLOG(INFO, INPUT_LOGGER) << "Notify " << handler;
boost::thread handler_caller(boost::bind(&EventHandler::handle, handler, event));
if(!handler_caller.timed_join(boost::posix_time::milliseconds(INPUT_HANDLER_TIMEOUT_MILLI)))