diff options
Diffstat (limited to 'src/modules/FileLogger/FileLogger.h')
-rw-r--r-- | src/modules/FileLogger/FileLogger.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/FileLogger/FileLogger.h b/src/modules/FileLogger/FileLogger.h index 04e2126..9b0f8e2 100644 --- a/src/modules/FileLogger/FileLogger.h +++ b/src/modules/FileLogger/FileLogger.h @@ -29,7 +29,7 @@ namespace Mad { namespace Modules { -class FileLogger : private Core::Logger, private Core::RemoteLogger { +class FileLogger : public Core::Logger, public Core::RemoteLogger { private: class ConfigHelper : public Core::Configurable { protected: @@ -40,7 +40,7 @@ class FileLogger : private Core::Logger, private Core::RemoteLogger { }; static ConfigHelper configHelper; - static std::set<FileLogger*> loggers; + static std::set<boost::shared_ptr<FileLogger> > loggers; std::ofstream file; @@ -63,8 +63,8 @@ class FileLogger : private Core::Logger, private Core::RemoteLogger { static void unregisterConfigHelper() { Core::ConfigManager::get()->unregisterConfigurable(&configHelper); - for(std::set<FileLogger*>::iterator logger = loggers.begin(); logger != loggers.end(); ++logger) { - delete *logger; + for(std::set<boost::shared_ptr<FileLogger> >::iterator logger = loggers.begin(); logger != loggers.end(); ++logger) { + Core::LogManager::get()->unregisterLogger(boost::static_pointer_cast<Logger>(*logger)); } loggers.clear(); |