From a7a285eb61dd83afc892bc1d64ffe14b9f1426a3 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 27 Sep 2009 23:51:34 +0200 Subject: Completely migrate to Unicode String class --- src/modules/FileLogger/FileLogger.h | 4 ++-- src/modules/FileLogger/Module.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules/FileLogger') 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; -- cgit v1.2.3