Adapts logging
This commit is contained in:
@@ -12,10 +12,10 @@ namespace input
|
||||
DistributingEvent::DistributingEvent(uint8_t address, int priority, std::string name,
|
||||
std::chrono::milliseconds bounce_time, std::shared_ptr<EventNotifier> event_notifier)
|
||||
:
|
||||
Event(address, priority, std::move(name)),
|
||||
bounce_time(bounce_time),
|
||||
event_notifier(std::move(event_notifier)),
|
||||
activation_state(NOT_ACTIVATED)
|
||||
Event(address, priority, std::move(name)),
|
||||
bounce_time(bounce_time),
|
||||
event_notifier(std::move(event_notifier)),
|
||||
activation_state(NOT_ACTIVATED)
|
||||
{}
|
||||
|
||||
void DistributingEvent::distribute()
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace input
|
||||
Event::Event(uint8_t address, int priority, std::string name) :
|
||||
address(address), priority(priority), name(name)
|
||||
{
|
||||
//CLOG_IF(VLOG_IS_ON(0), INFO, INPUT_LOGGER) << "Created event: " << name << ", address: " << address;
|
||||
CLOG_IF(VLOG_IS_ON(0), DEBUG, INPUT_LOGGER) << "Created event: " << name << ", address: " << address;
|
||||
}
|
||||
|
||||
std::string Event::getJsonString()
|
||||
|
||||
@@ -18,13 +18,13 @@ namespace input
|
||||
namespace detail
|
||||
{
|
||||
|
||||
Detector::Detector(std::unique_ptr<InputPinController> input_pin_controller, std::vector<std::shared_ptr<DistributingEvent>> events)
|
||||
:
|
||||
input_pin_controller(std::move(input_pin_controller)), events(std::move(events)), is_running(true)
|
||||
Detector::Detector(std::unique_ptr<InputPinController> input_pin_controller, std::vector<std::shared_ptr<DistributingEvent>> events) :
|
||||
input_pin_controller(std::move(input_pin_controller)), events(std::move(events)), is_running(true)
|
||||
{
|
||||
this->detect_thread = std::thread(&Detector::detect, this);
|
||||
|
||||
CLOG(INFO, INPUT_LOGGER) << "Created Detector and started detecting!";
|
||||
CLOG(DEBUG, INPUT_LOGGER) << "Created Detector";
|
||||
CLOG(INFO, INPUT_LOGGER) << "Detector thread running. Occuring input-events should get detected now!";
|
||||
}
|
||||
|
||||
Detector::~Detector()
|
||||
|
||||
@@ -22,7 +22,7 @@ event_queue(queue)
|
||||
{
|
||||
this->notify_thread = std::thread(&EventNotifier::notify, this);
|
||||
|
||||
CLOG(INFO, INPUT_LOGGER) << "Created EventNotifier and started thread";
|
||||
CLOG(DEBUG, INPUT_LOGGER) << "Created EventNotifier and started thread";
|
||||
}
|
||||
|
||||
EventNotifier::~EventNotifier()
|
||||
|
||||
@@ -19,7 +19,7 @@ InputDriver::InputDriver(std::shared_ptr<EventNotifier> event_notifier, std::uni
|
||||
std::map<std::string, std::shared_ptr<Event>> events) :
|
||||
event_notifier(std::move(event_notifier)), detector(std::move(detector)), events(std::move(events))
|
||||
{
|
||||
CLOG(INFO, INPUT_LOGGER) << "Created InputDriver";
|
||||
CLOG(INFO, INPUT_LOGGER) << "InputDriver created and running.";
|
||||
}
|
||||
|
||||
void InputDriver::register_event_handler(std::shared_ptr<EventHandler> handler)
|
||||
|
||||
Reference in New Issue
Block a user