summaryrefslogtreecommitdiffstats
path: root/src/Core/Logger.h
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-09-27 23:51:34 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-09-27 23:51:34 +0200
commita7a285eb61dd83afc892bc1d64ffe14b9f1426a3 (patch)
tree08d2efcaec46e5f5702d9e336a0e8ba7e636aff9 /src/Core/Logger.h
parentb40ba0cf91603b695f1f2380cbd39966a458f22f (diff)
downloadmad-a7a285eb61dd83afc892bc1d64ffe14b9f1426a3.tar
mad-a7a285eb61dd83afc892bc1d64ffe14b9f1426a3.zip
Completely migrate to Unicode String class
Diffstat (limited to 'src/Core/Logger.h')
-rw-r--r--src/Core/Logger.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Core/Logger.h b/src/Core/Logger.h
index a43b340..89fdc8d 100644
--- a/src/Core/Logger.h
+++ b/src/Core/Logger.h
@@ -20,8 +20,9 @@
#ifndef MAD_CORE_LOGGER_H_
#define MAD_CORE_LOGGER_H_
+#include "String.h"
+
#include <bitset>
-#include <string>
#include <boost/date_time/posix_time/ptime.hpp>
namespace Mad {
@@ -54,13 +55,13 @@ class Logger {
Logger() : level(LOG_DEFAULT), remoteLevel(LOG_DEFAULT) {setAllCategories(); setAllRemoteCategories(); remote = false;}
virtual ~Logger() {}
- void log(MessageCategory category, MessageLevel level, boost::posix_time::ptime timestamp, const std::string &message, const std::string &source) {
- if((source.empty() && getLevel() >= level && isCategorySet(category))
- || (!source.empty() && remote && getRemoteLevel() >= level && isRemoteCategorySet(category)))
+ void log(MessageCategory category, MessageLevel level, boost::posix_time::ptime timestamp, const Core::String &message, const Core::String &source) {
+ if((source.isEmpty() && getLevel() >= level && isCategorySet(category))
+ || (!source.isEmpty() && remote && getRemoteLevel() >= level && isRemoteCategorySet(category)))
logMessage(category, level, timestamp, message, source);
}
- virtual void logMessage(MessageCategory category, MessageLevel level, boost::posix_time::ptime timestamp, const std::string &message, const std::string &source) = 0;
+ virtual void logMessage(MessageCategory category, MessageLevel level, boost::posix_time::ptime timestamp, const Core::String &message, const Core::String &source) = 0;
public:
void setCategory(MessageCategory newCategory) {