refactored loggerfactory
This commit is contained in:
@@ -7,9 +7,7 @@
|
||||
|
||||
|
||||
#include "InputDriverFactory.h"
|
||||
|
||||
#include "utilities/LoggerFactory.hpp"
|
||||
|
||||
#include "EventNotifier.h"
|
||||
|
||||
using namespace nlohmann;
|
||||
@@ -20,14 +18,11 @@ namespace Input
|
||||
|
||||
std::shared_ptr<InputDriver> InputDriverFactory::get_InputDriver(std::istream& input_config_stream, std::istream& matrix_config_stream)
|
||||
{
|
||||
ConfigureLogger();
|
||||
LoggerFactory::CreateInputLogger();
|
||||
|
||||
IBlockingQueue<Event>* event_queue = new BlockingQueue<Event>;
|
||||
|
||||
std::shared_ptr<IEventNotifier> event_notifier = std::make_shared<EventNotifier>(event_queue);
|
||||
|
||||
std::unique_ptr<IInputGPIOInterface> input_gpio_interface = std::make_unique<InputGPIOInterface>(input_config_stream);
|
||||
|
||||
std::unique_ptr<IDetector> detector(std::move(get_detector(matrix_config_stream, std::move(input_gpio_interface), event_notifier)));
|
||||
|
||||
return std::shared_ptr<InputDriver>(new InputDriver(event_notifier, std::move(detector)));
|
||||
@@ -70,10 +65,5 @@ std::map<char, Event> InputDriverFactory::create_input_events(json matrix_config
|
||||
return events;
|
||||
}
|
||||
|
||||
void InputDriverFactory::ConfigureLogger()
|
||||
{
|
||||
LoggerFactory::CreateInputTestLogger();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -10,9 +10,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
class LoggerFactory
|
||||
namespace LoggerFactory
|
||||
{
|
||||
public:
|
||||
static void CreateInputTestLogger()
|
||||
{
|
||||
el::Loggers::getLogger(INPUT_LOGGER);
|
||||
|
||||
Reference in New Issue
Block a user