summaryrefslogtreecommitdiffstats
path: root/src/Common
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2008-11-17 08:25:02 +0100
committerMatthias Schiffer <matthias@gamezock.de>2008-11-17 08:25:02 +0100
commit62ca019532b28527facf6ab133742c2a190f15d6 (patch)
tree2b02963ed8a8a0d21dbe42885c2e284d3c60620c /src/Common
parent2b83ae7c71dc706fb4fd7b4efc4a8ffee8dfe522 (diff)
downloadmad-62ca019532b28527facf6ab133742c2a190f15d6.tar
mad-62ca019532b28527facf6ab133742c2a190f15d6.zip
Configurable von Initializable ableiten; InformationManager ist jetzt auch ein Initializable
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/Configurable.h4
-rw-r--r--src/Common/LogManager.cpp8
-rw-r--r--src/Common/LogManager.h2
3 files changed, 12 insertions, 2 deletions
diff --git a/src/Common/Configurable.h b/src/Common/Configurable.h
index 47f919d..90641a0 100644
--- a/src/Common/Configurable.h
+++ b/src/Common/Configurable.h
@@ -20,13 +20,15 @@
#ifndef MAD_COMMON_CONFIGURABLE_H_
#define MAD_COMMON_CONFIGURABLE_H_
+#include "Initializable.h"
+
namespace Mad {
namespace Common {
class ConfigEntry;
class ConfigManager;
-class Configurable {
+class Configurable : virtual public Initializable {
public:
virtual ~Configurable() {}
diff --git a/src/Common/LogManager.cpp b/src/Common/LogManager.cpp
index 7b4e898..d974d7c 100644
--- a/src/Common/LogManager.cpp
+++ b/src/Common/LogManager.cpp
@@ -69,6 +69,14 @@ void LogManager::configFinished() {
log(message.category, message.level, message.timestamp, message.message);
queue->pop();
}
+
+ std::auto_ptr<std::queue<RemoteMessage> > queue2 = remoteMessageQueue;
+
+ while(!queue2->empty()) {
+ const RemoteMessage &message = queue2->front();
+ log(message.category, message.level, message.timestamp, message.message, message.source);
+ queue2->pop();
+ }
}
void LogManager::log(MessageCategory category, MessageLevel level, time_t timestamp, const std::string &message) {
diff --git a/src/Common/LogManager.h b/src/Common/LogManager.h
index c1bba9f..846bc95 100644
--- a/src/Common/LogManager.h
+++ b/src/Common/LogManager.h
@@ -33,7 +33,7 @@
namespace Mad {
namespace Common {
-class LogManager : public Initializable, public Configurable {
+class LogManager : public Configurable {
private:
typedef LoggerBase::MessageCategory MessageCategory;
typedef LoggerBase::MessageLevel MessageLevel;