diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-06-20 00:22:50 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-06-20 10:56:02 -0400 |
commit | 9c2ed42daa8fbbef4a919c21ec564e2db55e8d60 (patch) | |
tree | 3814f79c10d7b490948d8cb7b112ac1dd41ceff1 /src/mongo/logger/logger.cpp | |
parent | 01965cf52bce6976637ecb8f4a622aeb05ab256a (diff) | |
download | mongo-9c2ed42daa8fbbef4a919c21ec564e2db55e8d60.tar.gz |
SERVER-18579: Clang-Format - reformat code, no comment reflow
Diffstat (limited to 'src/mongo/logger/logger.cpp')
-rw-r--r-- | src/mongo/logger/logger.cpp | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/src/mongo/logger/logger.cpp b/src/mongo/logger/logger.cpp index b99ebbdfcfc..c7451edc170 100644 --- a/src/mongo/logger/logger.cpp +++ b/src/mongo/logger/logger.cpp @@ -34,32 +34,30 @@ namespace mongo { namespace logger { - static LogManager* theGlobalLogManager; // NULL at program start, before even static - // initialization. +static LogManager* theGlobalLogManager; // NULL at program start, before even static + // initialization. - static RotatableFileManager theGlobalRotatableFileManager; +static RotatableFileManager theGlobalRotatableFileManager; - LogManager* globalLogManager() { - if (MONGO_unlikely(!theGlobalLogManager)) { - theGlobalLogManager = new LogManager; - } - return theGlobalLogManager; +LogManager* globalLogManager() { + if (MONGO_unlikely(!theGlobalLogManager)) { + theGlobalLogManager = new LogManager; } + return theGlobalLogManager; +} - RotatableFileManager* globalRotatableFileManager() { - return &theGlobalRotatableFileManager; - } - - /** - * Just in case no static initializer called globalLogManager, make sure that the global log - * manager is instantiated while we're still in a single-threaded context. - */ - MONGO_INITIALIZER_GENERAL(GlobalLogManager, ("ValidateLocale"), ("default"))( - InitializerContext*) { +RotatableFileManager* globalRotatableFileManager() { + return &theGlobalRotatableFileManager; +} - globalLogManager(); - return Status::OK(); - } +/** + * Just in case no static initializer called globalLogManager, make sure that the global log + * manager is instantiated while we're still in a single-threaded context. + */ +MONGO_INITIALIZER_GENERAL(GlobalLogManager, ("ValidateLocale"), ("default"))(InitializerContext*) { + globalLogManager(); + return Status::OK(); +} } // namespace logger } // namespace mongo |