summaryrefslogtreecommitdiffstats
path: root/src/modules/FileLogger
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/FileLogger')
-rw-r--r--src/modules/FileLogger/Module.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/FileLogger/Module.cpp b/src/modules/FileLogger/Module.cpp
index d000c8b..663389f 100644
--- a/src/modules/FileLogger/Module.cpp
+++ b/src/modules/FileLogger/Module.cpp
@@ -32,9 +32,9 @@ bool Module::handleConfigEntry(const Core::ConfigEntry &entry, bool handled) {
if(entry[0].getKey().matches("Log")) {
if(entry[0][0].matches("File")) {
- if(entry[1].empty()) {
- if(!entry[0][1].empty()) {
- lastLogger.reset(new FileLogger(entry[0][1]));
+ if(entry[1].isEmpty()) {
+ if(!entry[0][1].isEmpty()) {
+ lastLogger.reset(new FileLogger(entry[0][1].extract()));
loggers.insert(lastLogger);
application->getLogManager()->registerLogger(lastLogger);
@@ -47,15 +47,15 @@ bool Module::handleConfigEntry(const Core::ConfigEntry &entry, bool handled) {
return true;
}
else if(entry[1].getKey().matches("Level")) {
- if(entry[2].empty()) {
+ if(entry[2].isEmpty()) {
try {
- if(boost::algorithm::to_lower_copy(static_cast<std::string>(entry[1][0])) == "remote")
+ if(entry[1][0].matches("remote"))
lastLogger->setRemoteLevel(Core::LogManager::parseLevel(entry[1][1]));
else
lastLogger->setLevel(Core::LogManager::parseLevel(entry[1][0]));
}
catch(Core::Exception e) {
- application->logf(Core::Logger::LOG_WARNING, "Unknown log level '%s'.", entry[1][0].c_str());
+ application->logf(Core::Logger::LOG_WARNING, "Unknown log level '%s'.", entry[1][0].extract().c_str());
}
return true;