From 62ca019532b28527facf6ab133742c2a190f15d6 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 17 Nov 2008 08:25:02 +0100 Subject: Configurable von Initializable ableiten; InformationManager ist jetzt auch ein Initializable --- src/Common/Configurable.h | 4 +++- src/Common/LogManager.cpp | 8 ++++++++ src/Common/LogManager.h | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src/Common') 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 > 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; -- cgit v1.2.3