diff options
Diffstat (limited to 'src/mongo/logger/log_manager.cpp')
-rw-r--r-- | src/mongo/logger/log_manager.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/mongo/logger/log_manager.cpp b/src/mongo/logger/log_manager.cpp index af1d5900e2e..c3a22bc20e4 100644 --- a/src/mongo/logger/log_manager.cpp +++ b/src/mongo/logger/log_manager.cpp @@ -35,25 +35,25 @@ namespace mongo { namespace logger { - LogManager::LogManager() { - // Should really fassert that the following status .isOK(), but it never fails. - _globalDomain.attachAppender(MessageLogDomain::AppenderAutoPtr( - new ConsoleAppender<MessageEventEphemeral>(new MessageEventDetailsEncoder))); +LogManager::LogManager() { + // Should really fassert that the following status .isOK(), but it never fails. + _globalDomain.attachAppender(MessageLogDomain::AppenderAutoPtr( + new ConsoleAppender<MessageEventEphemeral>(new MessageEventDetailsEncoder))); +} + +LogManager::~LogManager() { + for (DomainsByNameMap::iterator iter = _domains.begin(); iter != _domains.end(); ++iter) { + delete iter->second; } +} - LogManager::~LogManager() { - for (DomainsByNameMap::iterator iter = _domains.begin(); iter != _domains.end(); ++iter) { - delete iter->second; - } - } - - MessageLogDomain* LogManager::getNamedDomain(const std::string& name) { - MessageLogDomain*& domain = _domains[name]; - if (!domain) { - domain = new MessageLogDomain; - } - return domain; +MessageLogDomain* LogManager::getNamedDomain(const std::string& name) { + MessageLogDomain*& domain = _domains[name]; + if (!domain) { + domain = new MessageLogDomain; } + return domain; +} } // logger } // mongo |