diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-09-27 01:55:44 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-09-27 01:55:44 +0200 |
commit | e1d8490f0654a3da0b900407d80d91d8d0da68c8 (patch) | |
tree | d65b4bd4a596a98061e094120b6a1aed388d1c89 /src/modules/FileLogger | |
parent | d88c486ae403bee8f4b16e4bdf9daf19f8915eed (diff) | |
download | mad-e1d8490f0654a3da0b900407d80d91d8d0da68c8.tar mad-e1d8490f0654a3da0b900407d80d91d8d0da68c8.zip |
Use libicu to support unicode properly; migrated ConfigManager to UnicodeString
Diffstat (limited to 'src/modules/FileLogger')
-rw-r--r-- | src/modules/FileLogger/Module.cpp | 12 |
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; |