WIP. Added console/file logger
This commit is contained in:
@@ -5,6 +5,13 @@ ConfigReader::ConfigReader(boost::filesystem::path p)
|
||||
_config.readFile(p.string().c_str());
|
||||
}
|
||||
|
||||
void
|
||||
ConfigReader::getLoggerConfig(Logger::Config& config)
|
||||
{
|
||||
config.enableFileLogging = _config.lookupValue("main.logger.file", config.logPath);
|
||||
config.enableConsoleLogging = _config.lookup("main.logger.console");
|
||||
}
|
||||
|
||||
void
|
||||
ConfigReader::getUserInterfaceConfig(Service::UserInterfaceService::Config& config)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <libconfig.h++>
|
||||
|
||||
#include "logger/Logger.hpp"
|
||||
|
||||
#include "service/UserInterfaceService.hpp"
|
||||
#include "service/RemoteServerService.hpp"
|
||||
#include "service/DatabaseUpdateService.hpp"
|
||||
@@ -14,6 +16,10 @@ class ConfigReader
|
||||
|
||||
ConfigReader(boost::filesystem::path p);
|
||||
|
||||
// Logger configuration
|
||||
void getLoggerConfig(Logger::Config& config);
|
||||
|
||||
// Service configurations
|
||||
void getUserInterfaceConfig(Service::UserInterfaceService::Config& config);
|
||||
void getRemoteServerConfig(Service::RemoteServerService::Config& config);
|
||||
void getDatabaseUpdateConfig(Service::DatabaseUpdateService::Config& config);
|
||||
|
||||
Reference in New Issue
Block a user