diff options
Diffstat (limited to 'src/Core/LogManager.h')
-rw-r--r-- | src/Core/LogManager.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Core/LogManager.h b/src/Core/LogManager.h index 8c8d091..0ed21b8 100644 --- a/src/Core/LogManager.h +++ b/src/Core/LogManager.h @@ -35,10 +35,12 @@ namespace Mad { namespace Core { +class Application; class ThreadManager; class LogManager : public Configurable { private: + friend class Application; friend class ThreadManager; typedef LoggerBase::MessageCategory MessageCategory; @@ -76,7 +78,7 @@ class LogManager : public Configurable { }; - static LogManager logManager; + Application *application; boost::shared_ptr<ConsoleLogger> consoleLogger; @@ -101,7 +103,8 @@ class LogManager : public Configurable { queueCond.notify_one(); } - LogManager() : consoleLogger(new ConsoleLogger), configured(false), running(false) {} + LogManager(Application *application0); + ~LogManager(); protected: virtual bool handleConfigEntry(const ConfigEntry &entry, bool handled); @@ -134,10 +137,6 @@ class LogManager : public Configurable { remoteLoggers.erase(logger); remoteLoggerLock.unlock(); } - - static LogManager *get() { - return &logManager; - } }; } |