From f8c98bee1208e04259814e0818f405081132d42c Mon Sep 17 00:00:00 2001 From: Benety Goh Date: Fri, 27 Jun 2014 10:15:15 -0400 Subject: SERVER-5092 assign default log component to server modules --- src/mongo/util/background.cpp | 6 +++++- src/mongo/util/net/ssl_manager.cpp | 10 +++++++++- src/mongo/util/net/ssl_manager.h | 7 ++++--- src/mongo/util/paths.cpp | 5 ++++- 4 files changed, 22 insertions(+), 6 deletions(-) (limited to 'src/mongo/util') diff --git a/src/mongo/util/background.cpp b/src/mongo/util/background.cpp index 21231162cff..748ffdf818c 100644 --- a/src/mongo/util/background.cpp +++ b/src/mongo/util/background.cpp @@ -27,7 +27,7 @@ * then also delete it in the license file. */ -#include "mongo/pch.h" +#include "mongo/platform/basic.h" #include "mongo/util/background.h" @@ -39,6 +39,8 @@ #include "mongo/util/concurrency/mutex.h" #include "mongo/util/concurrency/spin_lock.h" #include "mongo/util/concurrency/thread_name.h" +#include "mongo/util/debug_util.h" +#include "mongo/util/log.h" #include "mongo/util/mongoutils/str.h" #include "mongo/util/net/ssl_manager.h" #include "mongo/util/time_support.h" @@ -47,6 +49,8 @@ using namespace std; namespace mongo { + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kCommands); + namespace { class PeriodicTaskRunner : public BackgroundJob { diff --git a/src/mongo/util/net/ssl_manager.cpp b/src/mongo/util/net/ssl_manager.cpp index 95e1e109751..81cf5610ef5 100644 --- a/src/mongo/util/net/ssl_manager.cpp +++ b/src/mongo/util/net/ssl_manager.cpp @@ -25,18 +25,21 @@ * then also delete it in the license file. */ -#include "mongo/pch.h" +#include "mongo/platform/basic.h" #include "mongo/util/net/ssl_manager.h" #include #include +#include #include #include #include "mongo/base/init.h" #include "mongo/platform/atomic_word.h" #include "mongo/util/concurrency/mutex.h" +#include "mongo/util/debug_util.h" +#include "mongo/util/log.h" #include "mongo/util/mongoutils/str.h" #include "mongo/util/net/sock.h" #include "mongo/util/net/ssl_options.h" @@ -47,7 +50,12 @@ #include #endif +using std::endl; + namespace mongo { + + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kNetworking); + SSLGlobalParams sslGlobalParams; #ifndef MONGO_SSL diff --git a/src/mongo/util/net/ssl_manager.h b/src/mongo/util/net/ssl_manager.h index 8e8419e1894..82698dd18ac 100644 --- a/src/mongo/util/net/ssl_manager.h +++ b/src/mongo/util/net/ssl_manager.h @@ -25,18 +25,19 @@ * then also delete it in the license file. */ -#ifdef MONGO_SSL - #pragma once #include + +#ifdef MONGO_SSL + #include "mongo/base/disallow_copying.h" #include "mongo/util/net/sock.h" #include #include -#endif +#endif // #ifdef MONGO_SSL namespace mongo { /* diff --git a/src/mongo/util/paths.cpp b/src/mongo/util/paths.cpp index 9be10b73353..56ac3a68b59 100644 --- a/src/mongo/util/paths.cpp +++ b/src/mongo/util/paths.cpp @@ -25,13 +25,16 @@ * then also delete it in the license file. */ +#include "mongo/platform/basic.h" + #include "mongo/util/paths.h" -#include "mongo/platform/basic.h" #include "mongo/util/log.h" namespace mongo { + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kStorage); + void flushMyDirectory(const boost::filesystem::path& file) { #ifdef __linux__ // this isn't needed elsewhere static bool _warnedAboutFilesystem = false; -- cgit v1.2.1