summaryrefslogtreecommitdiffstats
path: root/src/modules/FileLogger
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-09-27 01:55:44 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-09-27 01:55:44 +0200
commite1d8490f0654a3da0b900407d80d91d8d0da68c8 (patch)
treed65b4bd4a596a98061e094120b6a1aed388d1c89 /src/modules/FileLogger
parentd88c486ae403bee8f4b16e4bdf9daf19f8915eed (diff)
downloadmad-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.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;