diff options
author | Matt Kangas <matt.kangas@mongodb.com> | 2014-10-10 16:59:23 -0400 |
---|---|---|
committer | Matt Kangas <matt.kangas@mongodb.com> | 2014-10-27 14:00:14 -0400 |
commit | 28373a8a57c5caec25c02efb8b365f20d05387c6 (patch) | |
tree | 1f93338b91d709557efdbca3c136b1a4c9bf3898 /src | |
parent | 2509427be884a0a127b230bf4c2f98ac007aa05a (diff) | |
download | mongo-28373a8a57c5caec25c02efb8b365f20d05387c6.tar.gz |
SERVER-15604 log component kControl
Diffstat (limited to 'src')
33 files changed, 40 insertions, 37 deletions
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp index 2f82a287043..caf5a3e5b18 100644 --- a/src/mongo/db/db.cpp +++ b/src/mongo/db/db.cpp @@ -410,7 +410,7 @@ namespace mongo { { ProcessId pid = ProcessId::getCurrent(); - LogstreamBuilder l = log(LogComponent::kDefault); + LogstreamBuilder l = log(LogComponent::kControl); l << "MongoDB starting : pid=" << pid << " port=" << serverGlobalParams.port << " dbpath=" << storageGlobalParams.dbpath; @@ -421,7 +421,7 @@ namespace mongo { l << ( is32bit ? " 32" : " 64" ) << "-bit host=" << getHostNameCached() << endl; } - DEV log(LogComponent::kDefault) << "_DEBUG build (which is slower)" << endl; + DEV log(LogComponent::kControl) << "_DEBUG build (which is slower)" << endl; logMongodStartupWarnings(); #if defined(_WIN32) @@ -779,14 +779,14 @@ static int mongoDbMain(int argc, char* argv[], char **envp) { unsigned x = 0x12345678; unsigned char& b = (unsigned char&) x; if ( b != 0x78 ) { - mongo::log(LogComponent::kDefault) << "big endian cpus not yet supported" << endl; + mongo::log(LogComponent::kControl) << "big endian cpus not yet supported" << endl; return 33; } } Status status = mongo::runGlobalInitializers(argc, argv, envp); if (!status.isOK()) { - severe(LogComponent::kDefault) << "Failed global initialization: " << status; + severe(LogComponent::kControl) << "Failed global initialization: " << status; quickExit(EXIT_FAILURE); } diff --git a/src/mongo/db/initialize_server_global_state.cpp b/src/mongo/db/initialize_server_global_state.cpp index dff48366380..7097e5dafc4 100644 --- a/src/mongo/db/initialize_server_global_state.cpp +++ b/src/mongo/db/initialize_server_global_state.cpp @@ -26,7 +26,7 @@ * it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/pch.h" diff --git a/src/mongo/db/log_process_details.cpp b/src/mongo/db/log_process_details.cpp index 2d96603185e..e20e726c9c0 100644 --- a/src/mongo/db/log_process_details.cpp +++ b/src/mongo/db/log_process_details.cpp @@ -28,7 +28,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/platform/basic.h" diff --git a/src/mongo/db/mongod_options.cpp b/src/mongo/db/mongod_options.cpp index b18c23f7e94..d3cd8c991a1 100644 --- a/src/mongo/db/mongod_options.cpp +++ b/src/mongo/db/mongod_options.cpp @@ -26,7 +26,7 @@ * it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/db/mongod_options.h" diff --git a/src/mongo/db/server_options_helpers.cpp b/src/mongo/db/server_options_helpers.cpp index aee04f87fb2..cc549560836 100644 --- a/src/mongo/db/server_options_helpers.cpp +++ b/src/mongo/db/server_options_helpers.cpp @@ -26,7 +26,7 @@ * it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/db/server_options_helpers.h" diff --git a/src/mongo/db/startup_warnings_common.cpp b/src/mongo/db/startup_warnings_common.cpp index ca24d2c0d70..96597324fa0 100644 --- a/src/mongo/db/startup_warnings_common.cpp +++ b/src/mongo/db/startup_warnings_common.cpp @@ -26,7 +26,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/platform/basic.h" diff --git a/src/mongo/db/startup_warnings_mongod.cpp b/src/mongo/db/startup_warnings_mongod.cpp index a6ebf1c9f59..ed6656355aa 100644 --- a/src/mongo/db/startup_warnings_mongod.cpp +++ b/src/mongo/db/startup_warnings_mongod.cpp @@ -26,7 +26,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/platform/basic.h" diff --git a/src/mongo/logger/log_component.cpp b/src/mongo/logger/log_component.cpp index 594d07905a6..051cbdc2e5f 100644 --- a/src/mongo/logger/log_component.cpp +++ b/src/mongo/logger/log_component.cpp @@ -93,6 +93,8 @@ std::string _dottedNames[LogComponent::kNumLogComponents+1]; case kDefault: return createStringData("default"); case kAccessControl: return createStringData("accessControl"); case kCommands: return createStringData("commands"); + case kControl: return createStringData("control"); + case kGeo: return createStringData("geo"); case kIndexing: return createStringData("indexing"); case kNetworking: return createStringData("networking"); case kQuery: return createStringData("query"); @@ -101,7 +103,6 @@ std::string _dottedNames[LogComponent::kNumLogComponents+1]; case kStorage: return createStringData("storage"); case kJournaling: return createStringData("journaling"); case kWrites: return createStringData("writes"); - case kGeo: return createStringData("geo"); case kNumLogComponents: return createStringData("total"); // No default. Compiler should complain if there's a log component that's not handled. } @@ -137,6 +138,8 @@ std::string _dottedNames[LogComponent::kNumLogComponents+1]; case kDefault: return createStringData("- "); case kAccessControl: return createStringData("ACCESS "); case kCommands: return createStringData("COMMANDS"); + case kControl: return createStringData("CONTROL "); + case kGeo: return createStringData("GEO "); case kIndexing: return createStringData("INDEXING"); case kNetworking: return createStringData("NETWORK "); case kQuery: return createStringData("QUERY "); @@ -145,7 +148,6 @@ std::string _dottedNames[LogComponent::kNumLogComponents+1]; case kStorage: return createStringData("STORAGE "); case kJournaling: return createStringData("JOURNAL "); case kWrites: return createStringData("WRITES "); - case kGeo: return createStringData("GEO "); case kNumLogComponents: return createStringData("TOTAL "); // No default. Compiler should complain if there's a log component that's not handled. } diff --git a/src/mongo/logger/log_component.h b/src/mongo/logger/log_component.h index 54b83bcb4a3..08777e2b525 100644 --- a/src/mongo/logger/log_component.h +++ b/src/mongo/logger/log_component.h @@ -46,6 +46,8 @@ namespace logger { kDefault = 0, kAccessControl, kCommands, + kControl, + kGeo, kIndexing, kNetworking, kQuery, @@ -54,7 +56,6 @@ namespace logger { kStorage, kJournaling, kWrites, - kGeo, kNumLogComponents }; diff --git a/src/mongo/util/exception_filter_win32.cpp b/src/mongo/util/exception_filter_win32.cpp index e95d0f49f59..e13b2dd6c0f 100644 --- a/src/mongo/util/exception_filter_win32.cpp +++ b/src/mongo/util/exception_filter_win32.cpp @@ -26,7 +26,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #ifdef _WIN32 diff --git a/src/mongo/util/fail_point.cpp b/src/mongo/util/fail_point.cpp index 719d9a5db1c..4e8a13dc483 100644 --- a/src/mongo/util/fail_point.cpp +++ b/src/mongo/util/fail_point.cpp @@ -26,7 +26,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/util/fail_point.h" diff --git a/src/mongo/util/log.cpp b/src/mongo/util/log.cpp index 4d753bd92e1..cd2a2f426b3 100644 --- a/src/mongo/util/log.cpp +++ b/src/mongo/util/log.cpp @@ -25,7 +25,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/platform/basic.h" diff --git a/src/mongo/util/logfile.cpp b/src/mongo/util/logfile.cpp index dd6e50533f4..bc374f6ff02 100644 --- a/src/mongo/util/logfile.cpp +++ b/src/mongo/util/logfile.cpp @@ -28,7 +28,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/pch.h" diff --git a/src/mongo/util/mmap.cpp b/src/mongo/util/mmap.cpp index 392b873f3c1..a2bef8abe36 100644 --- a/src/mongo/util/mmap.cpp +++ b/src/mongo/util/mmap.cpp @@ -27,7 +27,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/pch.h" diff --git a/src/mongo/util/mmap_posix.cpp b/src/mongo/util/mmap_posix.cpp index dabccfc093a..dea51fa7f7f 100644 --- a/src/mongo/util/mmap_posix.cpp +++ b/src/mongo/util/mmap_posix.cpp @@ -27,7 +27,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/pch.h" diff --git a/src/mongo/util/mmap_win.cpp b/src/mongo/util/mmap_win.cpp index 996f155b11f..f4c6efa31fd 100644 --- a/src/mongo/util/mmap_win.cpp +++ b/src/mongo/util/mmap_win.cpp @@ -27,7 +27,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/pch.h" diff --git a/src/mongo/util/net/ssl_expiration.cpp b/src/mongo/util/net/ssl_expiration.cpp index 733e0a01c10..9f1d6ef9676 100644 --- a/src/mongo/util/net/ssl_expiration.cpp +++ b/src/mongo/util/net/ssl_expiration.cpp @@ -25,7 +25,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/util/net/ssl_expiration.h" diff --git a/src/mongo/util/net/ssl_options.cpp b/src/mongo/util/net/ssl_options.cpp index f8fda92dbba..f49397f49e4 100644 --- a/src/mongo/util/net/ssl_options.cpp +++ b/src/mongo/util/net/ssl_options.cpp @@ -25,7 +25,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/platform/basic.h" diff --git a/src/mongo/util/ntservice.cpp b/src/mongo/util/ntservice.cpp index 163bdc03861..2c5dc8f66b7 100644 --- a/src/mongo/util/ntservice.cpp +++ b/src/mongo/util/ntservice.cpp @@ -27,7 +27,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #if defined(_WIN32) diff --git a/src/mongo/util/password.cpp b/src/mongo/util/password.cpp index a894903e7b3..da93ae45fb4 100644 --- a/src/mongo/util/password.cpp +++ b/src/mongo/util/password.cpp @@ -26,7 +26,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/pch.h" diff --git a/src/mongo/util/platform_init.cpp b/src/mongo/util/platform_init.cpp index 9eda6f3821c..da7ac750f35 100644 --- a/src/mongo/util/platform_init.cpp +++ b/src/mongo/util/platform_init.cpp @@ -26,7 +26,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/platform/basic.h" diff --git a/src/mongo/util/processinfo.cpp b/src/mongo/util/processinfo.cpp index b062e0a3885..e6b151b7d7a 100644 --- a/src/mongo/util/processinfo.cpp +++ b/src/mongo/util/processinfo.cpp @@ -27,7 +27,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/pch.h" diff --git a/src/mongo/util/processinfo_darwin.cpp b/src/mongo/util/processinfo_darwin.cpp index 43cd0edd85c..4967c88bbeb 100644 --- a/src/mongo/util/processinfo_darwin.cpp +++ b/src/mongo/util/processinfo_darwin.cpp @@ -27,7 +27,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/pch.h" #include "mongo/util/processinfo.h" diff --git a/src/mongo/util/processinfo_freebsd.cpp b/src/mongo/util/processinfo_freebsd.cpp index 84d792732dd..2d2c9bac302 100644 --- a/src/mongo/util/processinfo_freebsd.cpp +++ b/src/mongo/util/processinfo_freebsd.cpp @@ -25,7 +25,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include <cstdlib> #include <string> diff --git a/src/mongo/util/processinfo_linux2.cpp b/src/mongo/util/processinfo_linux2.cpp index 7ddeaaa538a..7d6764e7c47 100644 --- a/src/mongo/util/processinfo_linux2.cpp +++ b/src/mongo/util/processinfo_linux2.cpp @@ -27,7 +27,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include <malloc.h> #include <iostream> diff --git a/src/mongo/util/processinfo_openbsd5.cpp b/src/mongo/util/processinfo_openbsd5.cpp index e3d3e158749..6b48f2b9589 100644 --- a/src/mongo/util/processinfo_openbsd5.cpp +++ b/src/mongo/util/processinfo_openbsd5.cpp @@ -25,7 +25,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include <cstdlib> #include <string> diff --git a/src/mongo/util/processinfo_sunos5.cpp b/src/mongo/util/processinfo_sunos5.cpp index e45ee557b4e..ae02c30b655 100644 --- a/src/mongo/util/processinfo_sunos5.cpp +++ b/src/mongo/util/processinfo_sunos5.cpp @@ -25,7 +25,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include <boost/filesystem.hpp> #include <fstream> diff --git a/src/mongo/util/processinfo_win32.cpp b/src/mongo/util/processinfo_win32.cpp index 5581e0c245e..0dcc43609ca 100644 --- a/src/mongo/util/processinfo_win32.cpp +++ b/src/mongo/util/processinfo_win32.cpp @@ -27,7 +27,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/pch.h" diff --git a/src/mongo/util/signal_handlers.cpp b/src/mongo/util/signal_handlers.cpp index 7e638664460..2e0f73f8c1f 100644 --- a/src/mongo/util/signal_handlers.cpp +++ b/src/mongo/util/signal_handlers.cpp @@ -26,7 +26,7 @@ * it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/platform/basic.h" diff --git a/src/mongo/util/signal_handlers_synchronous.cpp b/src/mongo/util/signal_handlers_synchronous.cpp index 40149e310fc..4c9e8a57a00 100644 --- a/src/mongo/util/signal_handlers_synchronous.cpp +++ b/src/mongo/util/signal_handlers_synchronous.cpp @@ -26,7 +26,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/platform/basic.h" diff --git a/src/mongo/util/stacktrace_posix.cpp b/src/mongo/util/stacktrace_posix.cpp index e7a02154ee6..0df11bceb68 100644 --- a/src/mongo/util/stacktrace_posix.cpp +++ b/src/mongo/util/stacktrace_posix.cpp @@ -25,7 +25,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/platform/basic.h" diff --git a/src/mongo/util/stacktrace_win.cpp b/src/mongo/util/stacktrace_win.cpp index b22bb542b67..4abc27e3c97 100644 --- a/src/mongo/util/stacktrace_win.cpp +++ b/src/mongo/util/stacktrace_win.cpp @@ -25,7 +25,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/platform/basic.h" diff --git a/src/mongo/util/version_reporting.cpp b/src/mongo/util/version_reporting.cpp index e7019c67a89..b945a14a78e 100644 --- a/src/mongo/util/version_reporting.cpp +++ b/src/mongo/util/version_reporting.cpp @@ -27,7 +27,7 @@ * then also delete it in the license file. */ -#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl #include "mongo/platform/basic.h" |