configurated logging :see_no_evils

This commit is contained in:
Neeflix
2018-05-31 20:09:18 +02:00
parent 810c218539
commit d11163e018
2 changed files with 7 additions and 4 deletions

View File

@@ -64,10 +64,12 @@ private:
el::Loggers::getLogger(INPUT_LOGGER); el::Loggers::getLogger(INPUT_LOGGER);
//TODO may configure? //TODO may configure?
el::Configurations defaultConf; el::Configurations conf;
defaultConf.setToDefault(); conf.setToDefault();
conf.set(el::Level::Global, el::ConfigurationType::Filename, DRIVER_LOG_FILE);
conf.set(el::Level::Global, el::ConfigurationType::Format, "%datetime [%level] [%func] : %msg");
el::Loggers::reconfigureLogger(INPUT_LOGGER,defaultConf); el::Loggers::reconfigureLogger(INPUT_LOGGER, conf);
} }
}; };

View File

@@ -7,6 +7,7 @@
#include "../lib/easylogging/easylogging++.h" #include "../lib/easylogging/easylogging++.h"
#define INPUT_LOGGER "input_logger" #define INPUT_LOGGER "driver_logger"
#define DRIVER_LOG_FILE "/var/log/flippr_driver.conf"
#define INPUT_MATRIX_SIZE 8 #define INPUT_MATRIX_SIZE 8