summaryrefslogtreecommitdiffstats
path: root/src/Common
diff options
context:
space:
mode:
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;