diff options
Diffstat (limited to 'src/modules/FileLogger')
-rw-r--r-- | src/modules/FileLogger/FileLogger.h | 4 | ||||
-rw-r--r-- | src/modules/FileLogger/Module.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/FileLogger/FileLogger.h b/src/modules/FileLogger/FileLogger.h index edd74a8..9fccc64 100644 --- a/src/modules/FileLogger/FileLogger.h +++ b/src/modules/FileLogger/FileLogger.h @@ -33,8 +33,8 @@ class FileLogger : public Core::Logger { std::ofstream file; protected: - virtual void logMessage(MessageCategory /*category*/, MessageLevel /*level*/, boost::posix_time::ptime /*timestamp*/, const std::string &message, const std::string &source) { - if(source.empty()) + virtual void logMessage(MessageCategory /*category*/, MessageLevel /*level*/, boost::posix_time::ptime /*timestamp*/, const Core::String &message, const Core::String &source) { + if(source.isEmpty()) file << message << std::endl; else file << message << " from " << source << std::endl; diff --git a/src/modules/FileLogger/Module.cpp b/src/modules/FileLogger/Module.cpp index 663389f..d8a302c 100644 --- a/src/modules/FileLogger/Module.cpp +++ b/src/modules/FileLogger/Module.cpp @@ -34,7 +34,7 @@ bool Module::handleConfigEntry(const Core::ConfigEntry &entry, bool handled) { if(entry[0][0].matches("File")) { if(entry[1].isEmpty()) { if(!entry[0][1].isEmpty()) { - lastLogger.reset(new FileLogger(entry[0][1].extract())); + lastLogger.reset(new FileLogger(entry[0][1].toLocale())); loggers.insert(lastLogger); application->getLogManager()->registerLogger(lastLogger); @@ -55,7 +55,7 @@ bool Module::handleConfigEntry(const Core::ConfigEntry &entry, bool handled) { 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].extract().c_str()); + application->logf(Core::Logger::LOG_WARNING, "Unknown log level '%s'.", entry[1][0].toLocale().c_str()); } return true; |