summaryrefslogtreecommitdiffstats
path: root/src/Common/Logger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Logger.cpp')
-rw-r--r--src/Common/Logger.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Common/Logger.cpp b/src/Common/Logger.cpp
index f87d41b..a7d3bd1 100644
--- a/src/Common/Logger.cpp
+++ b/src/Common/Logger.cpp
@@ -19,6 +19,7 @@
#include "Logger.h"
#include <cstdlib>
+#include <ctime>
namespace Mad {
namespace Common {
@@ -55,9 +56,10 @@ void Logger::logfv(MessageCategory category, MessageLevel level, const char *for
}
void Logger::log(MessageCategory category, MessageLevel level, const std::string &message) {
+ time_t messageTimestamp = std::time(NULL);
for(std::list<Logger*>::iterator logger = loggers.begin(); logger != loggers.end(); ++logger) {
if((*logger)->getLevel() >= level && (*logger)->isCategorySet(category))
- (*logger)->logMessage(category, level, message);
+ (*logger)->logMessage(category, level, messageTimestamp, message);
}
}