diff options
Diffstat (limited to 'src')
1128 files changed, 3344 insertions, 1145 deletions
diff --git a/src/mongo/base/initializer.cpp b/src/mongo/base/initializer.cpp index c64e5770049..0002295b1f4 100644 --- a/src/mongo/base/initializer.cpp +++ b/src/mongo/base/initializer.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/util/quick_exit.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { class Initializer::Graph { diff --git a/src/mongo/base/secure_allocator.cpp b/src/mongo/base/secure_allocator.cpp index 47837cb5c7d..d99deaaa495 100644 --- a/src/mongo/base/secure_allocator.cpp +++ b/src/mongo/base/secure_allocator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -55,6 +54,9 @@ #include "mongo/util/static_immortal.h" #include "mongo/util/text.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo::secure_allocator_details { namespace { diff --git a/src/mongo/base/status.cpp b/src/mongo/base/status.cpp index 37dc2ea625a..b7f0b29302f 100644 --- a/src/mongo/base/status.cpp +++ b/src/mongo/base/status.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include <ostream> #include <sstream> @@ -38,6 +37,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { Status& Status::addContext(StringData reasonPrefix) { diff --git a/src/mongo/bson/bson_bm.cpp b/src/mongo/bson/bson_bm.cpp index aff0a7a9cec..f4a1064dbac 100644 --- a/src/mongo/bson/bson_bm.cpp +++ b/src/mongo/bson/bson_bm.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/bson/bsonobjbuilder.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/bson/bson_validate.cpp b/src/mongo/bson/bson_validate.cpp index 2a342321d40..34b81338e7f 100644 --- a/src/mongo/bson/bson_validate.cpp +++ b/src/mongo/bson/bson_validate.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include <cstring> #include <vector> @@ -37,6 +36,9 @@ #include "mongo/bson/bsonelement.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/bson/bson_validate_fuzzer.cpp b/src/mongo/bson/bson_validate_fuzzer.cpp index 081354218b1..e25de0564da 100644 --- a/src/mongo/bson/bson_validate_fuzzer.cpp +++ b/src/mongo/bson/bson_validate_fuzzer.cpp @@ -26,13 +26,15 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/bson/bson_validate.h" #include "mongo/bson/bson_validate_old.h" #include "mongo/logv2/log.h" #include "mongo/util/hex.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + extern "C" int LLVMFuzzerTestOneInput(const char* Data, size_t Size) { using namespace mongo; // The fuzzerOnly version is an older, slower implementation with less precise error messages. diff --git a/src/mongo/bson/bson_validate_test.cpp b/src/mongo/bson/bson_validate_test.cpp index 413efec49b7..f7207c3c371 100644 --- a/src/mongo/bson/bson_validate_test.cpp +++ b/src/mongo/bson/bson_validate_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/platform/random.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace { using namespace mongo; diff --git a/src/mongo/bson/bsonelement.cpp b/src/mongo/bson/bsonelement.cpp index dd331399950..1d62d0c3491 100644 --- a/src/mongo/bson/bsonelement.cpp +++ b/src/mongo/bson/bsonelement.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/bson/bsonelement.h" @@ -53,6 +52,9 @@ #include "mongo/util/string_map.h" #include "mongo/util/uuid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + #if !defined(__has_feature) #define __has_feature(x) 0 #endif diff --git a/src/mongo/bson/bsonobj.cpp b/src/mongo/bson/bsonobj.cpp index 7b5fa7dae04..6566398a883 100644 --- a/src/mongo/bson/bsonobj.cpp +++ b/src/mongo/bson/bsonobj.cpp @@ -28,7 +28,6 @@ */ #include "mongo/bson/bsonelement.h" -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/db/jsobj.h" @@ -44,6 +43,9 @@ #include "mongo/util/hex.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/bson/bsonobjbuilder.cpp b/src/mongo/bson/bsonobjbuilder.cpp index e8e50fd38a7..953a95687ea 100644 --- a/src/mongo/bson/bsonobjbuilder.cpp +++ b/src/mongo/bson/bsonobjbuilder.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/db/jsobj.h" @@ -36,6 +35,9 @@ #include "mongo/bson/timestamp.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { using std::string; diff --git a/src/mongo/bson/json.cpp b/src/mongo/bson/json.cpp index 8cbc550141e..1be7c8257ff 100644 --- a/src/mongo/bson/json.cpp +++ b/src/mongo/bson/json.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/bson/json.h" @@ -48,6 +47,9 @@ #include "mongo/util/time_support.h" #include "mongo/util/uuid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { using std::ostringstream; diff --git a/src/mongo/client/async_client.cpp b/src/mongo/client/async_client.cpp index 309475ec36e..030e22de674 100644 --- a/src/mongo/client/async_client.cpp +++ b/src/mongo/client/async_client.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -56,6 +55,9 @@ #include "mongo/util/net/ssl_peer_info.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { MONGO_FAIL_POINT_DEFINE(pauseBeforeMarkKeepOpen); diff --git a/src/mongo/client/authenticate.cpp b/src/mongo/client/authenticate.cpp index 26df7c56d0c..1e4dd8da074 100644 --- a/src/mongo/client/authenticate.cpp +++ b/src/mongo/client/authenticate.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/platform/basic.h" @@ -52,6 +51,9 @@ #include "mongo/util/net/ssl_options.h" #include "mongo/util/password_digest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { namespace auth { diff --git a/src/mongo/client/connection_string_connect.cpp b/src/mongo/client/connection_string_connect.cpp index c35347efd32..9af07f5a974 100644 --- a/src/mongo/client/connection_string_connect.cpp +++ b/src/mongo/client/connection_string_connect.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { Mutex ConnectionString::_connectHookMutex = MONGO_MAKE_LATCH(); diff --git a/src/mongo/client/connpool.cpp b/src/mongo/client/connpool.cpp index e52bd54d102..16b8e81a895 100644 --- a/src/mongo/client/connpool.cpp +++ b/src/mongo/client/connpool.cpp @@ -29,7 +29,6 @@ // _ todo: reconnect? -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -58,6 +57,9 @@ #include <sanitizer/lsan_interface.h> #endif +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { namespace { diff --git a/src/mongo/client/dbclient_base.cpp b/src/mongo/client/dbclient_base.cpp index 192d3c78dd8..e0022ab5d03 100644 --- a/src/mongo/client/dbclient_base.cpp +++ b/src/mongo/client/dbclient_base.cpp @@ -31,7 +31,6 @@ * Connect to a Mongo database as a database, from C++. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -72,6 +71,9 @@ #include "mongo/util/net/ssl_manager.h" #include "mongo/util/net/ssl_options.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { using std::endl; diff --git a/src/mongo/client/dbclient_connection.cpp b/src/mongo/client/dbclient_connection.cpp index a8038b6db10..1c84cb370bf 100644 --- a/src/mongo/client/dbclient_connection.cpp +++ b/src/mongo/client/dbclient_connection.cpp @@ -31,7 +31,6 @@ * Connect to a Mongo database as a database, from C++. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -82,6 +81,9 @@ #include "mongo/util/time_support.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { using std::endl; diff --git a/src/mongo/client/dbclient_cursor.cpp b/src/mongo/client/dbclient_cursor.cpp index 81de065de0b..bdb299fc040 100644 --- a/src/mongo/client/dbclient_cursor.cpp +++ b/src/mongo/client/dbclient_cursor.cpp @@ -31,7 +31,6 @@ * Connect to a Mongo database as a database, from C++. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -58,6 +57,9 @@ #include "mongo/util/exit.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { using std::endl; diff --git a/src/mongo/client/dbclient_cursor_test.cpp b/src/mongo/client/dbclient_cursor_test.cpp index 4aa1ea296a4..10a23615ab0 100644 --- a/src/mongo/client/dbclient_cursor_test.cpp +++ b/src/mongo/client/dbclient_cursor_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/client/dbclient_connection.h" #include "mongo/client/dbclient_cursor.h" @@ -36,6 +35,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/client/dbclient_rs.cpp b/src/mongo/client/dbclient_rs.cpp index bb460dffd4e..4b130c36142 100644 --- a/src/mongo/client/dbclient_rs.cpp +++ b/src/mongo/client/dbclient_rs.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/db/jsobj.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { using std::endl; diff --git a/src/mongo/client/fetcher.cpp b/src/mongo/client/fetcher.cpp index 45eb03d3366..868ffb90a97 100644 --- a/src/mongo/client/fetcher.cpp +++ b/src/mongo/client/fetcher.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kExecutor #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kExecutor + + namespace mongo { namespace { diff --git a/src/mongo/client/mongo_uri_test.cpp b/src/mongo/client/mongo_uri_test.cpp index f8c3027fb20..65467a197f5 100644 --- a/src/mongo/client/mongo_uri_test.cpp +++ b/src/mongo/client/mongo_uri_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include <boost/optional.hpp> #include <boost/optional/optional_io.hpp> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { using transport::ConnectSSLMode; diff --git a/src/mongo/client/remote_command_retry_scheduler_test.cpp b/src/mongo/client/remote_command_retry_scheduler_test.cpp index d7b64bfc573..ffc66be2ffe 100644 --- a/src/mongo/client/remote_command_retry_scheduler_test.cpp +++ b/src/mongo/client/remote_command_retry_scheduler_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/net/hostandport.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace { using namespace mongo; diff --git a/src/mongo/client/remote_command_targeter_rs.cpp b/src/mongo/client/remote_command_targeter_rs.cpp index 24fc64d8d36..cb19576086e 100644 --- a/src/mongo/client/remote_command_targeter_rs.cpp +++ b/src/mongo/client/remote_command_targeter_rs.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/util/net/hostandport.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { RemoteCommandTargeterRS::RemoteCommandTargeterRS(const std::string& rsName, diff --git a/src/mongo/client/replica_set_change_notifier.cpp b/src/mongo/client/replica_set_change_notifier.cpp index 25269cc8148..3f76e6c1a20 100644 --- a/src/mongo/client/replica_set_change_notifier.cpp +++ b/src/mongo/client/replica_set_change_notifier.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/stacktrace.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { void ReplicaSetChangeNotifier::_addListener(std::shared_ptr<Listener> listener) { diff --git a/src/mongo/client/replica_set_monitor.cpp b/src/mongo/client/replica_set_monitor.cpp index d5c08f5451e..b7349e205cf 100644 --- a/src/mongo/client/replica_set_monitor.cpp +++ b/src/mongo/client/replica_set_monitor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -55,6 +54,9 @@ #include "mongo/util/string_map.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { using std::numeric_limits; diff --git a/src/mongo/client/replica_set_monitor_manager.cpp b/src/mongo/client/replica_set_monitor_manager.cpp index 52db50f277c..81fbcc826de 100644 --- a/src/mongo/client/replica_set_monitor_manager.cpp +++ b/src/mongo/client/replica_set_monitor_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -52,6 +51,9 @@ #include "mongo/rpc/metadata/egress_metadata_hook_list.h" #include "mongo/util/duration.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { using std::set; diff --git a/src/mongo/client/sasl_client_authenticate_impl.cpp b/src/mongo/client/sasl_client_authenticate_impl.cpp index 3c9bd422270..3faec846279 100644 --- a/src/mongo/client/sasl_client_authenticate_impl.cpp +++ b/src/mongo/client/sasl_client_authenticate_impl.cpp @@ -34,7 +34,6 @@ * The primary entry point at runtime is saslClientAuthenticateImpl(). */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include "mongo/util/net/hostandport.h" #include "mongo/util/password_digest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { using executor::RemoteCommandRequest; diff --git a/src/mongo/client/sasl_sspi.cpp b/src/mongo/client/sasl_sspi.cpp index 695ec3f62dc..9500606dacd 100644 --- a/src/mongo/client/sasl_sspi.cpp +++ b/src/mongo/client/sasl_sspi.cpp @@ -29,7 +29,6 @@ #ifdef _WIN32 -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -44,6 +43,8 @@ #include "mongo/util/str.h" #include "mongo/util/text.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + extern "C" int plain_client_plug_init(const sasl_utils_t* utils, int maxversion, int* out_version, diff --git a/src/mongo/client/sdam/json_test_arg_parser.cpp b/src/mongo/client/sdam/json_test_arg_parser.cpp index f686d2a2b04..f5d4c8e39f2 100644 --- a/src/mongo/client/sdam/json_test_arg_parser.cpp +++ b/src/mongo/client/sdam/json_test_arg_parser.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/client/sdam/json_test_arg_parser.h" @@ -35,6 +34,9 @@ #include "mongo/util/options_parser/option_section.h" #include "mongo/util/options_parser/options_parser.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace moe = mongo::optionenvironment; namespace mongo::sdam { diff --git a/src/mongo/client/sdam/mock_topology_manager.cpp b/src/mongo/client/sdam/mock_topology_manager.cpp index b45ccc57a7d..e13f175d669 100644 --- a/src/mongo/client/sdam/mock_topology_manager.cpp +++ b/src/mongo/client/sdam/mock_topology_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/client/sdam/mock_topology_manager.h" @@ -37,6 +36,9 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/topology_version_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo::sdam { MockTopologyManager::MockTopologyManager() {} diff --git a/src/mongo/client/sdam/sdam_json_test_runner.cpp b/src/mongo/client/sdam/sdam_json_test_runner.cpp index b3fdcba09f0..36d4514accf 100644 --- a/src/mongo/client/sdam/sdam_json_test_runner.cpp +++ b/src/mongo/client/sdam/sdam_json_test_runner.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include <fstream> #include <iostream> @@ -50,6 +49,9 @@ #include "mongo/util/options_parser/option_section.h" #include "mongo/util/options_parser/options_parser.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + /** * This program runs the Server Discover and Monitoring JSON test files located in * the src/monogo/client/sdam/json_tests/sdam_tests sub-directory. diff --git a/src/mongo/client/sdam/server_description.cpp b/src/mongo/client/sdam/server_description.cpp index 0fbba4dd33b..5766db050b4 100644 --- a/src/mongo/client/sdam/server_description.cpp +++ b/src/mongo/client/sdam/server_description.cpp @@ -28,7 +28,6 @@ */ #include "mongo/client/sdam/server_description.h" -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include <algorithm> #include <boost/algorithm/string.hpp> @@ -41,6 +40,8 @@ #include "mongo/logv2/log.h" #include "mongo/util/duration.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + namespace mongo::sdam { diff --git a/src/mongo/client/sdam/server_selection_json_test_runner.cpp b/src/mongo/client/sdam/server_selection_json_test_runner.cpp index 5da205b53e1..3c0cfed7532 100644 --- a/src/mongo/client/sdam/server_selection_json_test_runner.cpp +++ b/src/mongo/client/sdam/server_selection_json_test_runner.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include <fstream> #include <iostream> @@ -52,6 +51,9 @@ #include "mongo/util/options_parser/option_section.h" #include "mongo/util/options_parser/options_parser.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + /** * This program runs the Server Discover and Monitoring JSON test files located in * the src/monogo/client/sdam/json_tests/server_selection_tests sub-directory. diff --git a/src/mongo/client/sdam/server_selector.cpp b/src/mongo/client/sdam/server_selector.cpp index 5dd58d95684..389907e9cbd 100644 --- a/src/mongo/client/sdam/server_selector.cpp +++ b/src/mongo/client/sdam/server_selector.cpp @@ -30,13 +30,15 @@ #include <algorithm> -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/client/sdam/topology_description.h" #include "mongo/db/wire_version.h" #include "mongo/logv2/log.h" #include "mongo/platform/random.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo::sdam { MONGO_FAIL_POINT_DEFINE(sdamServerSelectorIgnoreLatencyWindow); diff --git a/src/mongo/client/sdam/topology_description.cpp b/src/mongo/client/sdam/topology_description.cpp index 63ba155a3d8..5552aeacb94 100644 --- a/src/mongo/client/sdam/topology_description.cpp +++ b/src/mongo/client/sdam/topology_description.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/client/sdam/topology_description.h" @@ -41,6 +40,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + // Checkpoint to track when election Id and Set version is changed. MONGO_FAIL_POINT_DEFINE(maxElectionIdSetVersionPairUpdated); diff --git a/src/mongo/client/sdam/topology_description_test.cpp b/src/mongo/client/sdam/topology_description_test.cpp index e812a6a2baf..acf42d6fcea 100644 --- a/src/mongo/client/sdam/topology_description_test.cpp +++ b/src/mongo/client/sdam/topology_description_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/client/sdam/sdam_test_base.h" #include "mongo/client/sdam/topology_description.h" @@ -40,6 +39,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/death_test.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { bool operator==(const TopologyVersion& a, const TopologyVersion& b) { diff --git a/src/mongo/client/sdam/topology_listener.cpp b/src/mongo/client/sdam/topology_listener.cpp index 1b2730a1ce7..3eb730e439c 100644 --- a/src/mongo/client/sdam/topology_listener.cpp +++ b/src/mongo/client/sdam/topology_listener.cpp @@ -26,11 +26,13 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/client/sdam/topology_listener.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo::sdam { void TopologyEventsPublisher::registerListener(TopologyListenerPtr listener) { diff --git a/src/mongo/client/sdam/topology_manager.cpp b/src/mongo/client/sdam/topology_manager.cpp index f52fcc32330..cd845d68d14 100644 --- a/src/mongo/client/sdam/topology_manager.cpp +++ b/src/mongo/client/sdam/topology_manager.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/client/sdam/topology_manager.h" @@ -36,6 +35,9 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/topology_version_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo::sdam { namespace { diff --git a/src/mongo/client/sdam/topology_state_machine.cpp b/src/mongo/client/sdam/topology_state_machine.cpp index 5c8cb94c954..ee2d4eaa80f 100644 --- a/src/mongo/client/sdam/topology_state_machine.cpp +++ b/src/mongo/client/sdam/topology_state_machine.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/client/sdam/topology_state_machine.h" @@ -37,6 +36,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo::sdam { namespace { static constexpr auto kLogLevel = 0; diff --git a/src/mongo/client/server_discovery_monitor.cpp b/src/mongo/client/server_discovery_monitor.cpp index 27f77214a64..7c5921c4dab 100644 --- a/src/mongo/client/server_discovery_monitor.cpp +++ b/src/mongo/client/server_discovery_monitor.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/client/server_discovery_monitor.h" @@ -43,6 +42,9 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/metadata/egress_metadata_hook_list.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/client/server_discovery_monitor_expedited_test.cpp b/src/mongo/client/server_discovery_monitor_expedited_test.cpp index cb89d0229c3..396040ea029 100644 --- a/src/mongo/client/server_discovery_monitor_expedited_test.cpp +++ b/src/mongo/client/server_discovery_monitor_expedited_test.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/client/server_discovery_monitor.h" #include <boost/optional/optional_io.hpp> @@ -35,6 +34,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { class SingleServerDiscoveryMonitorExpeditedFixture : public unittest::Test { public: diff --git a/src/mongo/client/server_discovery_monitor_test.cpp b/src/mongo/client/server_discovery_monitor_test.cpp index 8747ccfc96d..0ab19dc9d2a 100644 --- a/src/mongo/client/server_discovery_monitor_test.cpp +++ b/src/mongo/client/server_discovery_monitor_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -51,6 +50,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/duration.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/client/server_ping_monitor.cpp b/src/mongo/client/server_ping_monitor.cpp index 23353157c41..f4ccc1d97a5 100644 --- a/src/mongo/client/server_ping_monitor.cpp +++ b/src/mongo/client/server_ping_monitor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include <iterator> @@ -43,6 +42,9 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/rpc/metadata/egress_metadata_hook_list.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { MONGO_FAIL_POINT_DEFINE(serverPingMonitorFailWithHostUnreachable); diff --git a/src/mongo/client/server_ping_monitor_test.cpp b/src/mongo/client/server_ping_monitor_test.cpp index 154d82ea459..9a3f53982b5 100644 --- a/src/mongo/client/server_ping_monitor_test.cpp +++ b/src/mongo/client/server_ping_monitor_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/duration.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/client/streamable_replica_set_monitor.cpp b/src/mongo/client/streamable_replica_set_monitor.cpp index 126fa882ca2..6772a77004c 100644 --- a/src/mongo/client/streamable_replica_set_monitor.cpp +++ b/src/mongo/client/streamable_replica_set_monitor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" #include "mongo/client/streamable_replica_set_monitor.h" @@ -56,6 +55,9 @@ #include "mongo/util/string_map.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { using namespace mongo::sdam; diff --git a/src/mongo/client/streamable_replica_set_monitor_discovery_time_processor.cpp b/src/mongo/client/streamable_replica_set_monitor_discovery_time_processor.cpp index 7a914b99985..cd5f9850a91 100644 --- a/src/mongo/client/streamable_replica_set_monitor_discovery_time_processor.cpp +++ b/src/mongo/client/streamable_replica_set_monitor_discovery_time_processor.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/client/streamable_replica_set_monitor_discovery_time_processor.h" #include <memory> @@ -34,6 +33,9 @@ #include "mongo/client/global_conn_pool.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { void StreamableReplicaSetMonitor::StreamableReplicaSetMonitorDiscoveryTimeProcessor:: diff --git a/src/mongo/client/streamable_replica_set_monitor_error_handler.cpp b/src/mongo/client/streamable_replica_set_monitor_error_handler.cpp index 30a22d454b1..aa5ea83f837 100644 --- a/src/mongo/client/streamable_replica_set_monitor_error_handler.cpp +++ b/src/mongo/client/streamable_replica_set_monitor_error_handler.cpp @@ -26,11 +26,13 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/client/streamable_replica_set_monitor_error_handler.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { SdamErrorHandler::ErrorActions SdamErrorHandler::computeErrorActions(const HostAndPort& host, const Status& status, diff --git a/src/mongo/client/streamable_replica_set_monitor_error_handler_test.cpp b/src/mongo/client/streamable_replica_set_monitor_error_handler_test.cpp index 787ab86026e..80372f608a8 100644 --- a/src/mongo/client/streamable_replica_set_monitor_error_handler_test.cpp +++ b/src/mongo/client/streamable_replica_set_monitor_error_handler_test.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/client/streamable_replica_set_monitor_error_handler.h" #include <boost/optional/optional_io.hpp> @@ -36,6 +35,9 @@ #include "mongo/platform/basic.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { using HandshakeStage = StreamableReplicaSetMonitorErrorHandler::HandshakeStage; using ErrorActions = StreamableReplicaSetMonitorErrorHandler::ErrorActions; diff --git a/src/mongo/client/streamable_replica_set_monitor_query_processor.cpp b/src/mongo/client/streamable_replica_set_monitor_query_processor.cpp index b26ea37c24e..fb048b54671 100644 --- a/src/mongo/client/streamable_replica_set_monitor_query_processor.cpp +++ b/src/mongo/client/streamable_replica_set_monitor_query_processor.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/client/streamable_replica_set_monitor_query_processor.h" #include <memory> @@ -34,6 +33,9 @@ #include "mongo/client/global_conn_pool.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { void StreamableReplicaSetMonitor::StreamableReplicaSetMonitorQueryProcessor::shutdown() { stdx::lock_guard lock(_mutex); diff --git a/src/mongo/crypto/mechanism_scram_test.cpp b/src/mongo/crypto/mechanism_scram_test.cpp index 6a401fb2942..6185844fe71 100644 --- a/src/mongo/crypto/mechanism_scram_test.cpp +++ b/src/mongo/crypto/mechanism_scram_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/crypto/sha256_block.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace scram { namespace { diff --git a/src/mongo/crypto/symmetric_crypto.cpp b/src/mongo/crypto/symmetric_crypto.cpp index 375a8264f59..7c7dde399ba 100644 --- a/src/mongo/crypto/symmetric_crypto.cpp +++ b/src/mongo/crypto/symmetric_crypto.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/util/net/ssl_manager.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace crypto { diff --git a/src/mongo/crypto/symmetric_crypto_openssl.cpp b/src/mongo/crypto/symmetric_crypto_openssl.cpp index d0e843dd7d9..42efc9a1d8d 100644 --- a/src/mongo/crypto/symmetric_crypto_openssl.cpp +++ b/src/mongo/crypto/symmetric_crypto_openssl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/util/net/ssl_manager.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace crypto { diff --git a/src/mongo/crypto/symmetric_crypto_test.cpp b/src/mongo/crypto/symmetric_crypto_test.cpp index 44dc27a024d..8f7acbd03dc 100644 --- a/src/mongo/crypto/symmetric_crypto_test.cpp +++ b/src/mongo/crypto/symmetric_crypto_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -744,5 +743,8 @@ TEST_F(AESTestVectors, CTRTestCase1234) { // we will have them in a separate file so that they do not overtake the code space #include "symmetric_crypto_tests.gen" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + } // namespace crypto } // namespace mongo diff --git a/src/mongo/crypto/symmetric_crypto_tom.cpp b/src/mongo/crypto/symmetric_crypto_tom.cpp index 174bcb8e0b7..2f659f817ba 100644 --- a/src/mongo/crypto/symmetric_crypto_tom.cpp +++ b/src/mongo/crypto/symmetric_crypto_tom.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -53,6 +52,9 @@ #include <tomcrypt.h> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + #ifdef MONGO_CONFIG_SSL #error This file should not be included if compiling with SSL support #endif diff --git a/src/mongo/crypto/symmetric_crypto_windows.cpp b/src/mongo/crypto/symmetric_crypto_windows.cpp index 10ea5ed3c9c..0f0b5a011fb 100644 --- a/src/mongo/crypto/symmetric_crypto_windows.cpp +++ b/src/mongo/crypto/symmetric_crypto_windows.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/util/errno_util.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace crypto { diff --git a/src/mongo/crypto/symmetric_key.cpp b/src/mongo/crypto/symmetric_key.cpp index 0e5ef2f1ff0..66e084e3a74 100644 --- a/src/mongo/crypto/symmetric_key.cpp +++ b/src/mongo/crypto/symmetric_key.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/util/secure_zero_memory.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { std::string SymmetricKeyId::_initStrRep() const { diff --git a/src/mongo/db/active_index_builds.cpp b/src/mongo/db/active_index_builds.cpp index 017ca49ecc8..100434694c9 100644 --- a/src/mongo/db/active_index_builds.cpp +++ b/src/mongo/db/active_index_builds.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/db/active_index_builds.h" #include "mongo/db/catalog/index_builds_manager.h" @@ -34,6 +33,9 @@ #include <boost/iterator/transform_iterator.hpp> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { ActiveIndexBuilds::~ActiveIndexBuilds() { diff --git a/src/mongo/db/api_parameters.cpp b/src/mongo/db/api_parameters.cpp index 5a6995c3f27..5acc12b09b6 100644 --- a/src/mongo/db/api_parameters.cpp +++ b/src/mongo/db/api_parameters.cpp @@ -27,12 +27,14 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" #include "mongo/db/api_parameters.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { const OperationContext::Decoration<APIParameters> APIParameters::get = diff --git a/src/mongo/db/auth/authentication_session.cpp b/src/mongo/db/auth/authentication_session.cpp index 30d6f74fc31..c67257e4073 100644 --- a/src/mongo/db/auth/authentication_session.cpp +++ b/src/mongo/db/auth/authentication_session.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/db/auth/authentication_session.h" @@ -36,6 +35,9 @@ #include "mongo/db/client.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { namespace { constexpr auto kDiagnosticLogLevel = 3; diff --git a/src/mongo/db/auth/authorization_contract.cpp b/src/mongo/db/auth/authorization_contract.cpp index 1991e1be954..18b5dfd24da 100644 --- a/src/mongo/db/auth/authorization_contract.cpp +++ b/src/mongo/db/auth/authorization_contract.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/db/auth/authorization_contract.h" @@ -38,6 +37,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/debug_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { void AuthorizationContract::clear() { diff --git a/src/mongo/db/auth/authorization_manager_impl.cpp b/src/mongo/db/auth/authorization_manager_impl.cpp index 93450c8b1f5..5a010ea5f9b 100644 --- a/src/mongo/db/auth/authorization_manager_impl.cpp +++ b/src/mongo/db/auth/authorization_manager_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/platform/basic.h" @@ -62,6 +61,9 @@ #include "mongo/util/net/ssl_types.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { namespace { diff --git a/src/mongo/db/auth/authorization_session_impl.cpp b/src/mongo/db/auth/authorization_session_impl.cpp index 8c2be85d37c..b18cc379089 100644 --- a/src/mongo/db/auth/authorization_session_impl.cpp +++ b/src/mongo/db/auth/authorization_session_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/platform/basic.h" @@ -55,6 +54,9 @@ #include "mongo/util/str.h" #include "mongo/util/testing_proctor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { namespace dps = ::mongo::dotted_path_support; diff --git a/src/mongo/db/auth/authz_manager_external_state_local.cpp b/src/mongo/db/auth/authz_manager_external_state_local.cpp index 3165f78919c..2eb9ba9c47d 100644 --- a/src/mongo/db/auth/authz_manager_external_state_local.cpp +++ b/src/mongo/db/auth/authz_manager_external_state_local.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/platform/basic.h" @@ -51,6 +50,9 @@ #include "mongo/util/net/ssl_types.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { using std::vector; diff --git a/src/mongo/db/auth/authz_session_external_state_server_common.cpp b/src/mongo/db/auth/authz_session_external_state_server_common.cpp index 8db1a60b36b..cf22ce96aae 100644 --- a/src/mongo/db/auth/authz_session_external_state_server_common.cpp +++ b/src/mongo/db/auth/authz_session_external_state_server_common.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/debug_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { namespace { diff --git a/src/mongo/db/auth/cluster_auth_mode.cpp b/src/mongo/db/auth/cluster_auth_mode.cpp index 6f8470981ab..43757c11246 100644 --- a/src/mongo/db/auth/cluster_auth_mode.cpp +++ b/src/mongo/db/auth/cluster_auth_mode.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { namespace { constexpr auto kKeyFileStr = "keyFile"_sd; diff --git a/src/mongo/db/auth/sasl_commands.cpp b/src/mongo/db/auth/sasl_commands.cpp index 55cbaf7f907..925916a6cef 100644 --- a/src/mongo/db/auth/sasl_commands.cpp +++ b/src/mongo/db/auth/sasl_commands.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/platform/basic.h" @@ -56,6 +55,9 @@ #include "mongo/util/sequence_util.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { namespace auth { namespace { diff --git a/src/mongo/db/auth/sasl_mechanism_registry.cpp b/src/mongo/db/auth/sasl_mechanism_registry.cpp index 11301ec43d0..e72e9afa30e 100644 --- a/src/mongo/db/auth/sasl_mechanism_registry.cpp +++ b/src/mongo/db/auth/sasl_mechanism_registry.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/sequence_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { namespace { diff --git a/src/mongo/db/auth/sasl_scram_test.cpp b/src/mongo/db/auth/sasl_scram_test.cpp index 467a347dfc8..431157c9b9d 100644 --- a/src/mongo/db/auth/sasl_scram_test.cpp +++ b/src/mongo/db/auth/sasl_scram_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -52,6 +51,9 @@ #include "mongo/util/base64.h" #include "mongo/util/password_digest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/auth/security_key.cpp b/src/mongo/db/auth/security_key.cpp index 838e8c6ce02..9c77e9fd581 100644 --- a/src/mongo/db/auth/security_key.cpp +++ b/src/mongo/db/auth/security_key.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/util/icu.h" #include "mongo/util/password_digest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { namespace { constexpr size_t kMinKeyLength = 6; diff --git a/src/mongo/db/auth/security_token.cpp b/src/mongo/db/auth/security_token.cpp index 80563838d45..586abb92aee 100644 --- a/src/mongo/db/auth/security_token.cpp +++ b/src/mongo/db/auth/security_token.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/db/auth/security_token.h" @@ -41,6 +40,9 @@ #include "mongo/logv2/log.h" #include "mongo/logv2/log_detail.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { namespace auth { namespace { diff --git a/src/mongo/db/auth/user_cache_invalidator_job.cpp b/src/mongo/db/auth/user_cache_invalidator_job.cpp index d9b3fc8d3d7..fe8650325f5 100644 --- a/src/mongo/db/auth/user_cache_invalidator_job.cpp +++ b/src/mongo/db/auth/user_cache_invalidator_job.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/util/duration.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { namespace { diff --git a/src/mongo/db/auth/user_document_parser.cpp b/src/mongo/db/auth/user_document_parser.cpp index d8320632bf5..738cf5214b5 100644 --- a/src/mongo/db/auth/user_document_parser.cpp +++ b/src/mongo/db/auth/user_document_parser.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/db/auth/user_document_parser.h" @@ -44,6 +43,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { namespace { diff --git a/src/mongo/db/catalog/capped_utils.cpp b/src/mongo/db/catalog/capped_utils.cpp index bd841f09345..ba307ee0124 100644 --- a/src/mongo/db/catalog/capped_utils.cpp +++ b/src/mongo/db/catalog/capped_utils.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -55,6 +54,9 @@ #include "mongo/db/service_context.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { Status emptyCapped(OperationContext* opCtx, const NamespaceString& collectionName) { diff --git a/src/mongo/db/catalog/catalog_control.cpp b/src/mongo/db/catalog/catalog_control.cpp index dadfed598c0..7266c3fa63b 100644 --- a/src/mongo/db/catalog/catalog_control.cpp +++ b/src/mongo/db/catalog/catalog_control.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #define LOGV2_FOR_RECOVERY(ID, DLEVEL, MESSAGE, ...) \ LOGV2_DEBUG_OPTIONS(ID, DLEVEL, {logv2::LogComponent::kStorageRecovery}, MESSAGE, ##__VA_ARGS__) @@ -46,6 +45,9 @@ #include "mongo/db/tenant_database_name.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace catalog { namespace { diff --git a/src/mongo/db/catalog/catalog_stats.cpp b/src/mongo/db/catalog/catalog_stats.cpp index 3450f854171..f45ffbcc6ce 100644 --- a/src/mongo/db/catalog/catalog_stats.cpp +++ b/src/mongo/db/catalog/catalog_stats.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/db/db_raii.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/catalog/clustered_collection_util.cpp b/src/mongo/db/catalog/clustered_collection_util.cpp index df6d1e6f0f2..08259baee76 100644 --- a/src/mongo/db/catalog/clustered_collection_util.cpp +++ b/src/mongo/db/catalog/clustered_collection_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/represent_as.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace clustered_util { diff --git a/src/mongo/db/catalog/coll_mod.cpp b/src/mongo/db/catalog/coll_mod.cpp index 203f1e8fb4f..0f88e0fc07a 100644 --- a/src/mongo/db/catalog/coll_mod.cpp +++ b/src/mongo/db/catalog/coll_mod.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -66,6 +65,9 @@ #include "mongo/util/version/releases.h" #include "mongo/util/visit_helper.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/catalog/coll_mod_index.cpp b/src/mongo/db/catalog/coll_mod_index.cpp index d56acc639f4..432c4dff255 100644 --- a/src/mongo/db/catalog/coll_mod_index.cpp +++ b/src/mongo/db/catalog/coll_mod_index.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/db/catalog/coll_mod_index.h" @@ -43,6 +42,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/shared_buffer_fragment.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace mongo { namespace { diff --git a/src/mongo/db/catalog/collection.cpp b/src/mongo/db/catalog/collection.cpp index 98d920c14f5..c891700c0ec 100644 --- a/src/mongo/db/catalog/collection.cpp +++ b/src/mongo/db/catalog/collection.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include <sstream> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { // diff --git a/src/mongo/db/catalog/collection_catalog.cpp b/src/mongo/db/catalog/collection_catalog.cpp index 34665a8f893..45b8667da8c 100644 --- a/src/mongo/db/catalog/collection_catalog.cpp +++ b/src/mongo/db/catalog/collection_catalog.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/uuid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { struct LatestCollectionCatalog { diff --git a/src/mongo/db/catalog/collection_compact.cpp b/src/mongo/db/catalog/collection_compact.cpp index 4fed779eaae..f37417cb3ac 100644 --- a/src/mongo/db/catalog/collection_compact.cpp +++ b/src/mongo/db/catalog/collection_compact.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/db/catalog/collection_compact.h" @@ -43,6 +42,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { using logv2::LogComponent; diff --git a/src/mongo/db/catalog/collection_impl.cpp b/src/mongo/db/catalog/collection_impl.cpp index 57f5c849135..0fefc706426 100644 --- a/src/mongo/db/catalog/collection_impl.cpp +++ b/src/mongo/db/catalog/collection_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -89,6 +88,9 @@ #include "mongo/rpc/object_check.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/catalog/collection_validation.cpp b/src/mongo/db/catalog/collection_validation.cpp index 37ddbccff8d..610d7c39ca7 100644 --- a/src/mongo/db/catalog/collection_validation.cpp +++ b/src/mongo/db/catalog/collection_validation.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -52,6 +51,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { using logv2::LogComponent; diff --git a/src/mongo/db/catalog/create_collection.cpp b/src/mongo/db/catalog/create_collection.cpp index c8e81835344..c66c6eab926 100644 --- a/src/mongo/db/catalog/create_collection.cpp +++ b/src/mongo/db/catalog/create_collection.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -62,6 +61,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/catalog/database_holder_impl.cpp b/src/mongo/db/catalog/database_holder_impl.cpp index ab643d7af2f..95e6d551413 100644 --- a/src/mongo/db/catalog/database_holder_impl.cpp +++ b/src/mongo/db/catalog/database_holder_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/db/storage/storage_engine.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { Database* DatabaseHolderImpl::getDb(OperationContext* opCtx, diff --git a/src/mongo/db/catalog/database_impl.cpp b/src/mongo/db/catalog/database_impl.cpp index b23f0f60046..d3c402ebd6d 100644 --- a/src/mongo/db/catalog/database_impl.cpp +++ b/src/mongo/db/catalog/database_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -82,6 +81,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/catalog/drop_collection.cpp b/src/mongo/db/catalog/drop_collection.cpp index e5d9a99335e..eb98e44b209 100644 --- a/src/mongo/db/catalog/drop_collection.cpp +++ b/src/mongo/db/catalog/drop_collection.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/catalog/drop_database.cpp b/src/mongo/db/catalog/drop_database.cpp index a5f516377b9..3aabb37e237 100644 --- a/src/mongo/db/catalog/drop_database.cpp +++ b/src/mongo/db/catalog/drop_database.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -51,6 +50,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { MONGO_FAIL_POINT_DEFINE(dropDatabaseHangAfterAllCollectionsDrop); diff --git a/src/mongo/db/catalog/drop_indexes.cpp b/src/mongo/db/catalog/drop_indexes.cpp index e98d103c6ca..e003e0e56ef 100644 --- a/src/mongo/db/catalog/drop_indexes.cpp +++ b/src/mongo/db/catalog/drop_indexes.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/visit_helper.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/catalog/index_build_block.cpp b/src/mongo/db/catalog/index_build_block.cpp index 6174e891b64..fc5d39109d8 100644 --- a/src/mongo/db/catalog/index_build_block.cpp +++ b/src/mongo/db/catalog/index_build_block.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace mongo { class IndexCatalog; diff --git a/src/mongo/db/catalog/index_builds_manager.cpp b/src/mongo/db/catalog/index_builds_manager.cpp index a5db8f4536f..f2b696f7c02 100644 --- a/src/mongo/db/catalog/index_builds_manager.cpp +++ b/src/mongo/db/catalog/index_builds_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/util/progress_meter.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/catalog/index_catalog.cpp b/src/mongo/db/catalog/index_catalog.cpp index 5d0a88b0a9b..394ad121ce2 100644 --- a/src/mongo/db/catalog/index_catalog.cpp +++ b/src/mongo/db/catalog/index_catalog.cpp @@ -27,13 +27,14 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/platform/basic.h" #include "mongo/db/catalog/index_catalog.h" #include "mongo/db/index/index_descriptor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + namespace mongo { using IndexIterator = IndexCatalog::IndexIterator; diff --git a/src/mongo/db/catalog/index_catalog_entry.cpp b/src/mongo/db/catalog/index_catalog_entry.cpp index 91c1d6ab9a5..299e4e30e10 100644 --- a/src/mongo/db/catalog/index_catalog_entry.cpp +++ b/src/mongo/db/catalog/index_catalog_entry.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/db/index/index_access_method.h" #include "mongo/db/index/index_descriptor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace mongo { std::shared_ptr<IndexCatalogEntry> IndexCatalogEntryContainer::release( diff --git a/src/mongo/db/catalog/index_catalog_entry_impl.cpp b/src/mongo/db/catalog/index_catalog_entry_impl.cpp index ff87c3f7e81..b53aadbf696 100644 --- a/src/mongo/db/catalog/index_catalog_entry_impl.cpp +++ b/src/mongo/db/catalog/index_catalog_entry_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/platform/basic.h" @@ -57,6 +56,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace mongo { MONGO_FAIL_POINT_DEFINE(skipUpdateIndexMultikey); diff --git a/src/mongo/db/catalog/index_catalog_impl.cpp b/src/mongo/db/catalog/index_catalog_impl.cpp index fcabb573617..1c186a7e7ef 100644 --- a/src/mongo/db/catalog/index_catalog_impl.cpp +++ b/src/mongo/db/catalog/index_catalog_impl.cpp @@ -27,9 +27,6 @@ * it in the license file. */ -#include "mongo/client/index_spec.h" -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex - #include "mongo/platform/basic.h" #include "mongo/db/catalog/index_catalog_impl.h" @@ -88,6 +85,9 @@ #include "mongo/util/represent_as.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace mongo { MONGO_FAIL_POINT_DEFINE(skipUnindexingDocumentWhenDeleted); diff --git a/src/mongo/db/catalog/index_consistency.cpp b/src/mongo/db/catalog/index_consistency.cpp index 029009c9704..63074afcfac 100644 --- a/src/mongo/db/catalog/index_consistency.cpp +++ b/src/mongo/db/catalog/index_consistency.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include <algorithm> @@ -47,6 +46,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/string_map.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/catalog/index_key_validate.cpp b/src/mongo/db/catalog/index_key_validate.cpp index db4d50e2d23..310fbbb53e5 100644 --- a/src/mongo/db/catalog/index_key_validate.cpp +++ b/src/mongo/db/catalog/index_key_validate.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/platform/basic.h" @@ -55,6 +54,9 @@ #include "mongo/util/represent_as.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace mongo { namespace index_key_validate { diff --git a/src/mongo/db/catalog/list_indexes.cpp b/src/mongo/db/catalog/list_indexes.cpp index 660c4068f83..d3abf868b28 100644 --- a/src/mongo/db/catalog/list_indexes.cpp +++ b/src/mongo/db/catalog/list_indexes.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/uuid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + // Failpoint which causes to hang "listIndexes" cmd after acquiring the DB lock. MONGO_FAIL_POINT_DEFINE(hangBeforeListIndexes); diff --git a/src/mongo/db/catalog/local_oplog_info.cpp b/src/mongo/db/catalog/local_oplog_info.cpp index d7e51eb2892..048216bbbe8 100644 --- a/src/mongo/db/catalog/local_oplog_info.cpp +++ b/src/mongo/db/catalog/local_oplog_info.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCatalog #include "mongo/db/catalog/local_oplog_info.h" @@ -39,6 +38,9 @@ #include "mongo/db/vector_clock_mutable.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCatalog + + namespace mongo { namespace { diff --git a/src/mongo/db/catalog/multi_index_block.cpp b/src/mongo/db/catalog/multi_index_block.cpp index 41debec3cf5..6467a65c25d 100644 --- a/src/mongo/db/catalog/multi_index_block.cpp +++ b/src/mongo/db/catalog/multi_index_block.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/platform/basic.h" @@ -64,6 +63,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/uuid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace mongo { MONGO_FAIL_POINT_DEFINE(hangAfterSettingUpIndexBuild); diff --git a/src/mongo/db/catalog/rename_collection.cpp b/src/mongo/db/catalog/rename_collection.cpp index 16a0f011753..93d742ce030 100644 --- a/src/mongo/db/catalog/rename_collection.cpp +++ b/src/mongo/db/catalog/rename_collection.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -63,6 +62,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/catalog/validate_adaptor.cpp b/src/mongo/db/catalog/validate_adaptor.cpp index b6cf1a5fa9c..095d028f8f4 100644 --- a/src/mongo/db/catalog/validate_adaptor.cpp +++ b/src/mongo/db/catalog/validate_adaptor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -58,6 +57,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/testing_proctor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/catalog/validate_state.cpp b/src/mongo/db/catalog/validate_state.cpp index 434950b9540..cf664b6f4b1 100644 --- a/src/mongo/db/catalog/validate_state.cpp +++ b/src/mongo/db/catalog/validate_state.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { MONGO_FAIL_POINT_DEFINE(hangDuringYieldingLocksForValidation); diff --git a/src/mongo/db/catalog/validate_state_test.cpp b/src/mongo/db/catalog/validate_state_test.cpp index e8e4bfbbbd9..531deab2ca6 100644 --- a/src/mongo/db/catalog/validate_state_test.cpp +++ b/src/mongo/db/catalog/validate_state_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/db/storage/wiredtiger/wiredtiger_global_options.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/catalog/views_for_database.cpp b/src/mongo/db/catalog/views_for_database.cpp index 0346a76cccd..df50cc263ae 100644 --- a/src/mongo/db/catalog/views_for_database.cpp +++ b/src/mongo/db/catalog/views_for_database.cpp @@ -27,12 +27,14 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "views_for_database.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { StatusWith<std::unique_ptr<CollatorInterface>> ViewsForDatabase::parseCollator( diff --git a/src/mongo/db/catalog_raii.cpp b/src/mongo/db/catalog_raii.cpp index d52a15a3ece..a17fc0a4949 100644 --- a/src/mongo/db/catalog_raii.cpp +++ b/src/mongo/db/catalog_raii.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + MONGO_FAIL_POINT_DEFINE(hangBeforeAutoGetCollectionLockFreeShardedStateAccess); namespace mongo { diff --git a/src/mongo/db/catalog_raii_test.cpp b/src/mongo/db/catalog_raii_test.cpp index 8e849db9c7e..383a3dddc36 100644 --- a/src/mongo/db/catalog_raii_test.cpp +++ b/src/mongo/db/catalog_raii_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/change_stream_options_manager.cpp b/src/mongo/db/change_stream_options_manager.cpp index 30e85e41443..98da89d5094 100644 --- a/src/mongo/db/change_stream_options_manager.cpp +++ b/src/mongo/db/change_stream_options_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/db/change_stream_options_parameter_gen.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { const auto getChangeStreamOptionsManager = diff --git a/src/mongo/db/client_out_of_line_executor.cpp b/src/mongo/db/client_out_of_line_executor.cpp index 785b090043b..aba582e0455 100644 --- a/src/mongo/db/client_out_of_line_executor.cpp +++ b/src/mongo/db/client_out_of_line_executor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/db/client_out_of_line_executor.h" @@ -40,6 +39,9 @@ #include "mongo/util/clock_source.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { // Per-instance implementation details that need not appear in the header. diff --git a/src/mongo/db/client_strand.cpp b/src/mongo/db/client_strand.cpp index 97b3d92bfaf..41aa4af3d9e 100644 --- a/src/mongo/db/client_strand.cpp +++ b/src/mongo/db/client_strand.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/util/concurrency/thread_name.h" #include "mongo/util/thread_context.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { struct ClientStrandData { diff --git a/src/mongo/db/cloner.cpp b/src/mongo/db/cloner.cpp index 6106a4c2ae1..e0aa69cc74a 100644 --- a/src/mongo/db/cloner.cpp +++ b/src/mongo/db/cloner.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -66,6 +65,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { using IndexVersion = IndexDescriptor::IndexVersion; diff --git a/src/mongo/db/collection_index_usage_tracker.cpp b/src/mongo/db/collection_index_usage_tracker.cpp index 168e8766be1..a02f04cd89d 100644 --- a/src/mongo/db/collection_index_usage_tracker.cpp +++ b/src/mongo/db/collection_index_usage_tracker.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/clock_source.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { Counter64 collectionScansCounter; diff --git a/src/mongo/db/commands.cpp b/src/mongo/db/commands.cpp index 8c75b5cfaa8..7826963b3c2 100644 --- a/src/mongo/db/commands.cpp +++ b/src/mongo/db/commands.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -67,6 +66,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + using namespace fmt::literals; namespace mongo { diff --git a/src/mongo/db/commands/async_command_execution_test.cpp b/src/mongo/db/commands/async_command_execution_test.cpp index 308bac90967..7e798b2028b 100644 --- a/src/mongo/db/commands/async_command_execution_test.cpp +++ b/src/mongo/db/commands/async_command_execution_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include <fmt/format.h> @@ -43,6 +42,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/authentication_commands.cpp b/src/mongo/db/commands/authentication_commands.cpp index 0fef67553d0..e6746101ff2 100644 --- a/src/mongo/db/commands/authentication_commands.cpp +++ b/src/mongo/db/commands/authentication_commands.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/platform/basic.h" @@ -66,6 +65,9 @@ #include "mongo/util/net/ssl_types.h" #include "mongo/util/text.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/count_cmd.cpp b/src/mongo/db/commands/count_cmd.cpp index 35b360eb9b9..f8bb2ddbeb9 100644 --- a/src/mongo/db/commands/count_cmd.cpp +++ b/src/mongo/db/commands/count_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -52,6 +51,9 @@ #include "mongo/db/views/resolved_view.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/create_command.cpp b/src/mongo/db/commands/create_command.cpp index 10160cdcc62..e6b3a70efc5 100644 --- a/src/mongo/db/commands/create_command.cpp +++ b/src/mongo/db/commands/create_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/db/timeseries/timeseries_constants.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/create_indexes.cpp b/src/mongo/db/commands/create_indexes.cpp index ce65a938c42..787d027a184 100644 --- a/src/mongo/db/commands/create_indexes.cpp +++ b/src/mongo/db/commands/create_indexes.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/platform/basic.h" @@ -74,6 +73,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/uuid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/dbcheck.cpp b/src/mongo/db/commands/dbcheck.cpp index 9084c1c3c1b..46fb1f22983 100644 --- a/src/mongo/db/commands/dbcheck.cpp +++ b/src/mongo/db/commands/dbcheck.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -52,6 +51,9 @@ #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/dbcommands.cpp b/src/mongo/db/commands/dbcommands.cpp index a05733f72bc..6fb0f9c81c9 100644 --- a/src/mongo/db/commands/dbcommands.cpp +++ b/src/mongo/db/commands/dbcommands.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -103,6 +102,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/dbcommands_d.cpp b/src/mongo/db/commands/dbcommands_d.cpp index fe743b5e733..7110bce5edb 100644 --- a/src/mongo/db/commands/dbcommands_d.cpp +++ b/src/mongo/db/commands/dbcommands_d.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -92,6 +91,9 @@ #include "mongo/util/md5.hpp" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/dbhash.cpp b/src/mongo/db/commands/dbhash.cpp index 2096551bce8..d767fa8c112 100644 --- a/src/mongo/db/commands/dbhash.cpp +++ b/src/mongo/db/commands/dbhash.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -55,6 +54,9 @@ #include "mongo/util/net/socket_utils.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/distinct.cpp b/src/mongo/db/commands/distinct.cpp index da5b72c80e6..09a4350fddd 100644 --- a/src/mongo/db/commands/distinct.cpp +++ b/src/mongo/db/commands/distinct.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -61,6 +60,9 @@ #include "mongo/db/views/resolved_view.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/drop_indexes.cpp b/src/mongo/db/commands/drop_indexes.cpp index 8e0a48f013b..88326b20e48 100644 --- a/src/mongo/db/commands/drop_indexes.cpp +++ b/src/mongo/db/commands/drop_indexes.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -59,6 +58,9 @@ #include "mongo/util/exit_code.h" #include "mongo/util/quick_exit.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/feature_compatibility_version.cpp b/src/mongo/db/commands/feature_compatibility_version.cpp index 7062c8ec1e4..d7de347ab0d 100644 --- a/src/mongo/db/commands/feature_compatibility_version.cpp +++ b/src/mongo/db/commands/feature_compatibility_version.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -58,6 +57,9 @@ #include "mongo/transport/service_entry_point.h" #include "mongo/util/version/releases.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { using repl::UnreplicatedWritesBlock; diff --git a/src/mongo/db/commands/find_and_modify.cpp b/src/mongo/db/commands/find_and_modify.cpp index 0dafd9af984..b574b8fb91b 100644 --- a/src/mongo/db/commands/find_and_modify.cpp +++ b/src/mongo/db/commands/find_and_modify.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -78,6 +77,9 @@ #include "mongo/util/log_and_backoff.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/find_cmd.cpp b/src/mongo/db/commands/find_cmd.cpp index 7cb770d21c5..9c46f14d1f1 100644 --- a/src/mongo/db/commands/find_cmd.cpp +++ b/src/mongo/db/commands/find_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -66,6 +65,9 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/fle2_compact.cpp b/src/mongo/db/commands/fle2_compact.cpp index 03fc6c7b0a9..a038db800d5 100644 --- a/src/mongo/db/commands/fle2_compact.cpp +++ b/src/mongo/db/commands/fle2_compact.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/platform/mutex.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite + + MONGO_FAIL_POINT_DEFINE(fleCompactHangBeforeESCPlaceholderInsert); MONGO_FAIL_POINT_DEFINE(fleCompactHangAfterESCPlaceholderInsert); MONGO_FAIL_POINT_DEFINE(fleCompactHangBeforeECCPlaceholderInsert); diff --git a/src/mongo/db/commands/fle2_compact_cmd.cpp b/src/mongo/db/commands/fle2_compact_cmd.cpp index 4d0e5bba6bb..280d18674fb 100644 --- a/src/mongo/db/commands/fle2_compact_cmd.cpp +++ b/src/mongo/db/commands/fle2_compact_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/db/s/sharding_state.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/fsync.cpp b/src/mongo/db/commands/fsync.cpp index de77efdc687..08730c44930 100644 --- a/src/mongo/db/commands/fsync.cpp +++ b/src/mongo/db/commands/fsync.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -57,6 +56,9 @@ #include "mongo/util/background.h" #include "mongo/util/exit.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/generic.cpp b/src/mongo/db/commands/generic.cpp index e472bed49d7..fa71299887c 100644 --- a/src/mongo/db/commands/generic.cpp +++ b/src/mongo/db/commands/generic.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include <string> #include <vector> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/generic_servers.cpp b/src/mongo/db/commands/generic_servers.cpp index 41448e90dde..a01604ec1b0 100644 --- a/src/mongo/db/commands/generic_servers.cpp +++ b/src/mongo/db/commands/generic_servers.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -51,6 +50,9 @@ #include <string> #include <vector> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/get_cluster_parameter_command.cpp b/src/mongo/db/commands/get_cluster_parameter_command.cpp index 35060c90ed4..63ef032980b 100644 --- a/src/mongo/db/commands/get_cluster_parameter_command.cpp +++ b/src/mongo/db/commands/get_cluster_parameter_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/idl/cluster_server_parameter_gen.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/get_last_error.cpp b/src/mongo/db/commands/get_last_error.cpp index fab019a7379..dc6d4c7acca 100644 --- a/src/mongo/db/commands/get_last_error.cpp +++ b/src/mongo/db/commands/get_last_error.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/db/commands.h" #include "mongo/rpc/warn_deprecated_wire_ops.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/getmore_cmd.cpp b/src/mongo/db/commands/getmore_cmd.cpp index b3c00996ec6..7313bc4b1aa 100644 --- a/src/mongo/db/commands/getmore_cmd.cpp +++ b/src/mongo/db/commands/getmore_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -72,6 +71,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/index_filter_commands.cpp b/src/mongo/db/commands/index_filter_commands.cpp index 9a4d4495ca0..f040bd9eea3 100644 --- a/src/mongo/db/commands/index_filter_commands.cpp +++ b/src/mongo/db/commands/index_filter_commands.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -56,6 +55,8 @@ #include "mongo/logv2/log.h" #include "mongo/stdx/unordered_set.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + namespace { diff --git a/src/mongo/db/commands/kill_op.cpp b/src/mongo/db/commands/kill_op.cpp index ae190aa2a2a..fc00f0a1a08 100644 --- a/src/mongo/db/commands/kill_op.cpp +++ b/src/mongo/db/commands/kill_op.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { class KillOpCommand : public KillOpCmdBase { diff --git a/src/mongo/db/commands/kill_op_cmd_base.cpp b/src/mongo/db/commands/kill_op_cmd_base.cpp index f57fe108040..bace16861bc 100644 --- a/src/mongo/db/commands/kill_op_cmd_base.cpp +++ b/src/mongo/db/commands/kill_op_cmd_base.cpp @@ -27,7 +27,6 @@ * it in the license file. */ #include "mongo/db/auth/authorization_session.h" -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/rpc/metadata/client_metadata.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { void KillOpCmdBase::reportSuccessfulCompletion(OperationContext* opCtx, diff --git a/src/mongo/db/commands/killoperations_cmd.cpp b/src/mongo/db/commands/killoperations_cmd.cpp index 1709b438fb0..7be0ad4fe51 100644 --- a/src/mongo/db/commands/killoperations_cmd.cpp +++ b/src/mongo/db/commands/killoperations_cmd.cpp @@ -33,6 +33,7 @@ #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + namespace mongo { class KillOperationsCmd : public KillOperationsCmdBase<KillOperationsCmd> { diff --git a/src/mongo/db/commands/list_collections.cpp b/src/mongo/db/commands/list_collections.cpp index 093ff11a439..b7c52f38cd5 100644 --- a/src/mongo/db/commands/list_collections.cpp +++ b/src/mongo/db/commands/list_collections.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -68,6 +67,9 @@ #include "mongo/db/timeseries/timeseries_constants.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { using std::string; diff --git a/src/mongo/db/commands/list_indexes.cpp b/src/mongo/db/commands/list_indexes.cpp index f823dff4b6c..fcea20bd7d4 100644 --- a/src/mongo/db/commands/list_indexes.cpp +++ b/src/mongo/db/commands/list_indexes.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -59,6 +58,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/uuid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/map_reduce_agg.cpp b/src/mongo/db/commands/map_reduce_agg.cpp index 89635b4e53d..6a726a5469c 100644 --- a/src/mongo/db/commands/map_reduce_agg.cpp +++ b/src/mongo/db/commands/map_reduce_agg.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" #include <boost/intrusive_ptr.hpp> @@ -56,6 +55,9 @@ #include "mongo/db/query/plan_executor_factory.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo::map_reduce_agg { namespace { diff --git a/src/mongo/db/commands/map_reduce_out_options.cpp b/src/mongo/db/commands/map_reduce_out_options.cpp index 6c53741f032..cbdf67f2f63 100644 --- a/src/mongo/db/commands/map_reduce_out_options.cpp +++ b/src/mongo/db/commands/map_reduce_out_options.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include <string> #include <utility> @@ -36,6 +35,9 @@ #include "mongo/db/namespace_string.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { using namespace std::string_literals; diff --git a/src/mongo/db/commands/mr_test.cpp b/src/mongo/db/commands/mr_test.cpp index 95fe13b68ee..96bc35f2d89 100644 --- a/src/mongo/db/commands/mr_test.cpp +++ b/src/mongo/db/commands/mr_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include <functional> #include <memory> @@ -58,6 +57,9 @@ #include "mongo/scripting/engine.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/oplog_note.cpp b/src/mongo/db/commands/oplog_note.cpp index 9f93f116815..a617d9ff12c 100644 --- a/src/mongo/db/commands/oplog_note.cpp +++ b/src/mongo/db/commands/oplog_note.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { MONGO_FAIL_POINT_DEFINE(hangInAppendOplogNote); diff --git a/src/mongo/db/commands/parameters.cpp b/src/mongo/db/commands/parameters.cpp index ea32db50df2..ccfecb48501 100644 --- a/src/mongo/db/commands/parameters.cpp +++ b/src/mongo/db/commands/parameters.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + using std::string; using std::stringstream; diff --git a/src/mongo/db/commands/plan_cache_clear_command.cpp b/src/mongo/db/commands/plan_cache_clear_command.cpp index 1609577347e..daf4bb18937 100644 --- a/src/mongo/db/commands/plan_cache_clear_command.cpp +++ b/src/mongo/db/commands/plan_cache_clear_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/db/query/sbe_utils.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/profile_common.cpp b/src/mongo/db/commands/profile_common.cpp index 45727007ab2..625fae83723 100644 --- a/src/mongo/db/commands/profile_common.cpp +++ b/src/mongo/db/commands/profile_common.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/idl/idl_parser.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { Status ProfileCmdBase::checkAuthForCommand(Client* client, diff --git a/src/mongo/db/commands/rename_collection_cmd.cpp b/src/mongo/db/commands/rename_collection_cmd.cpp index ea9290e14c8..f35d8cebd6e 100644 --- a/src/mongo/db/commands/rename_collection_cmd.cpp +++ b/src/mongo/db/commands/rename_collection_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/db/service_context.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { using std::min; diff --git a/src/mongo/db/commands/resize_oplog.cpp b/src/mongo/db/commands/resize_oplog.cpp index 4433edae662..962945dda9f 100644 --- a/src/mongo/db/commands/resize_oplog.cpp +++ b/src/mongo/db/commands/resize_oplog.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/rotate_certificates_command.cpp b/src/mongo/db/commands/rotate_certificates_command.cpp index e389f54e058..65fd79fbaf1 100644 --- a/src/mongo/db/commands/rotate_certificates_command.cpp +++ b/src/mongo/db/commands/rotate_certificates_command.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/net/ssl_manager.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/run_aggregate.cpp b/src/mongo/db/commands/run_aggregate.cpp index f9aeacc0ab6..9ab5c0db701 100644 --- a/src/mongo/db/commands/run_aggregate.cpp +++ b/src/mongo/db/commands/run_aggregate.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -90,6 +89,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/string_map.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { using boost::intrusive_ptr; diff --git a/src/mongo/db/commands/rwc_defaults_commands.cpp b/src/mongo/db/commands/rwc_defaults_commands.cpp index 7fd405804f9..aa3978e13d4 100644 --- a/src/mongo/db/commands/rwc_defaults_commands.cpp +++ b/src/mongo/db/commands/rwc_defaults_commands.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/server_status_command.cpp b/src/mongo/db/commands/server_status_command.cpp index 41d5a45a0f9..4ff6a0736d7 100644 --- a/src/mongo/db/commands/server_status_command.cpp +++ b/src/mongo/db/commands/server_status_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/util/net/socket_utils.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { constexpr auto kTimingSection = "timing"_sd; diff --git a/src/mongo/db/commands/set_cluster_parameter_command.cpp b/src/mongo/db/commands/set_cluster_parameter_command.cpp index 005f17d0c06..696c6eda751 100644 --- a/src/mongo/db/commands/set_cluster_parameter_command.cpp +++ b/src/mongo/db/commands/set_cluster_parameter_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/idl/cluster_server_parameter_gen.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/set_cluster_parameter_invocation.cpp b/src/mongo/db/commands/set_cluster_parameter_invocation.cpp index 6d32f73b393..c422f16562d 100644 --- a/src/mongo/db/commands/set_cluster_parameter_invocation.cpp +++ b/src/mongo/db/commands/set_cluster_parameter_invocation.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/write_ops/batched_command_response.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { bool SetClusterParameterInvocation::invoke(OperationContext* opCtx, diff --git a/src/mongo/db/commands/set_cluster_parameter_invocation_test.cpp b/src/mongo/db/commands/set_cluster_parameter_invocation_test.cpp index e1e641c019e..960e4aebe54 100644 --- a/src/mongo/db/commands/set_cluster_parameter_invocation_test.cpp +++ b/src/mongo/db/commands/set_cluster_parameter_invocation_test.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/db/operation_context.h" #include "mongo/db/operation_id.h" @@ -41,6 +40,9 @@ #include "mongo/db/commands/set_cluster_parameter_invocation.h" #include "mongo/idl/idl_parser.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/set_feature_compatibility_version_command.cpp b/src/mongo/db/commands/set_feature_compatibility_version_command.cpp index 9f882d6e02c..dd8430ceee9 100644 --- a/src/mongo/db/commands/set_feature_compatibility_version_command.cpp +++ b/src/mongo/db/commands/set_feature_compatibility_version_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -97,6 +96,9 @@ #include "mongo/util/str.h" #include "mongo/util/version/releases.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + using namespace fmt::literals; namespace mongo { diff --git a/src/mongo/db/commands/set_user_write_block_mode_command.cpp b/src/mongo/db/commands/set_user_write_block_mode_command.cpp index f4f6cb1d61f..89c9dc5c464 100644 --- a/src/mongo/db/commands/set_user_write_block_mode_command.cpp +++ b/src/mongo/db/commands/set_user_write_block_mode_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/db/server_feature_flags_gen.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/shutdown.cpp b/src/mongo/db/commands/shutdown.cpp index 2eec6acf288..0fa728a7c59 100644 --- a/src/mongo/db/commands/shutdown.cpp +++ b/src/mongo/db/commands/shutdown.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/logv2/log.h" @@ -37,6 +36,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace shutdown_detail { diff --git a/src/mongo/db/commands/shutdown_d.cpp b/src/mongo/db/commands/shutdown_d.cpp index d1d06cf6adb..94d901c51c1 100644 --- a/src/mongo/db/commands/shutdown_d.cpp +++ b/src/mongo/db/commands/shutdown_d.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/db/s/transaction_coordinator_service.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/sleep_command.cpp b/src/mongo/db/commands/sleep_command.cpp index 4ba9c258a8f..a62c61a0e40 100644 --- a/src/mongo/db/commands/sleep_command.cpp +++ b/src/mongo/db/commands/sleep_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/db/concurrency/lock_manager_defs.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { /* for diagnostic / testing purposes. Enabled via command line. */ diff --git a/src/mongo/db/commands/tenant_migration_donor_cmds.cpp b/src/mongo/db/commands/tenant_migration_donor_cmds.cpp index e94f865d1cb..8520ae4831a 100644 --- a/src/mongo/db/commands/tenant_migration_donor_cmds.cpp +++ b/src/mongo/db/commands/tenant_migration_donor_cmds.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/db/auth/authorization_session.h" #include "mongo/db/commands.h" @@ -39,6 +38,9 @@ #include "mongo/db/repl/tenant_migration_donor_service.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/tenant_migration_recipient_cmds.cpp b/src/mongo/db/commands/tenant_migration_recipient_cmds.cpp index e826e51dacc..683c4e64fe4 100644 --- a/src/mongo/db/commands/tenant_migration_recipient_cmds.cpp +++ b/src/mongo/db/commands/tenant_migration_recipient_cmds.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/db/auth/authorization_session.h" #include "mongo/db/commands.h" @@ -38,6 +37,9 @@ #include "mongo/db/repl/tenant_migration_recipient_service.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/test_commands.cpp b/src/mongo/db/commands/test_commands.cpp index 9c76050ce77..4e17908e830 100644 --- a/src/mongo/db/commands/test_commands.cpp +++ b/src/mongo/db/commands/test_commands.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include <string> @@ -50,6 +49,9 @@ #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/traffic_recording_cmds.cpp b/src/mongo/db/commands/traffic_recording_cmds.cpp index 596e6dadf3f..143175c7301 100644 --- a/src/mongo/db/commands/traffic_recording_cmds.cpp +++ b/src/mongo/db/commands/traffic_recording_cmds.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/db/traffic_recorder_gen.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/txn_cmds.cpp b/src/mongo/db/commands/txn_cmds.cpp index a7b50d3741b..c06f80f2590 100644 --- a/src/mongo/db/commands/txn_cmds.cpp +++ b/src/mongo/db/commands/txn_cmds.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/db/transaction_validation.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/user_management_commands.cpp b/src/mongo/db/commands/user_management_commands.cpp index 14a4688e01a..edb5bafd6a6 100644 --- a/src/mongo/db/commands/user_management_commands.cpp +++ b/src/mongo/db/commands/user_management_commands.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/platform/basic.h" @@ -88,6 +87,9 @@ #include "mongo/util/time_support.h" #include "mongo/util/uuid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/validate.cpp b/src/mongo/db/commands/validate.cpp index 5c1a4658cde..60ff0850f21 100644 --- a/src/mongo/db/commands/validate.cpp +++ b/src/mongo/db/commands/validate.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { // Sets the 'valid' result field to false and returns immediately. diff --git a/src/mongo/db/commands/validate_db_metadata_cmd.cpp b/src/mongo/db/commands/validate_db_metadata_cmd.cpp index f635336802f..510dcd0ac32 100644 --- a/src/mongo/db/commands/validate_db_metadata_cmd.cpp +++ b/src/mongo/db/commands/validate_db_metadata_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/db/views/view_catalog_helpers.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { void overrideAPIParams(OperationContext* opCtx, const APIParamsForCmd& params) { diff --git a/src/mongo/db/commands/vote_commit_index_build_command.cpp b/src/mongo/db/commands/vote_commit_index_build_command.cpp index d9b2bfbde44..cf28b263838 100644 --- a/src/mongo/db/commands/vote_commit_index_build_command.cpp +++ b/src/mongo/db/commands/vote_commit_index_build_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/db/repl/repl_client_info.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/commands/write_commands.cpp b/src/mongo/db/commands/write_commands.cpp index 9e6d189b4a3..d76053e34a7 100644 --- a/src/mongo/db/commands/write_commands.cpp +++ b/src/mongo/db/commands/write_commands.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/base/checked_cast.h" #include "mongo/bson/bsonobjbuilder.h" @@ -83,6 +82,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/string_map.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/db/concurrency/d_concurrency.cpp b/src/mongo/db/concurrency/d_concurrency.cpp index db11862b65b..d6e701634f7 100644 --- a/src/mongo/db/concurrency/d_concurrency.cpp +++ b/src/mongo/db/concurrency/d_concurrency.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/util/stacktrace.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/db/concurrency/d_concurrency_bm.cpp b/src/mongo/db/concurrency/d_concurrency_bm.cpp index d59755db9db..5838c79a14f 100644 --- a/src/mongo/db/concurrency/d_concurrency_bm.cpp +++ b/src/mongo/db/concurrency/d_concurrency_bm.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" #include <benchmark/benchmark.h> @@ -38,6 +37,9 @@ #include "mongo/platform/mutex.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/concurrency/d_concurrency_test.cpp b/src/mongo/db/concurrency/d_concurrency_test.cpp index eda8f50423b..90473d76edf 100644 --- a/src/mongo/db/concurrency/d_concurrency_test.cpp +++ b/src/mongo/db/concurrency/d_concurrency_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/concurrency/deferred_writer.cpp b/src/mongo/db/concurrency/deferred_writer.cpp index 7a7577ee8e5..a0866cb1ccb 100644 --- a/src/mongo/db/concurrency/deferred_writer.cpp +++ b/src/mongo/db/concurrency/deferred_writer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite #include "mongo/db/concurrency/deferred_writer.h" #include "mongo/db/catalog/create_collection.h" @@ -39,6 +38,9 @@ #include "mongo/util/concurrency/idle_thread_block.h" #include "mongo/util/concurrency/thread_pool.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite + + namespace mongo { namespace { diff --git a/src/mongo/db/concurrency/exception_util.cpp b/src/mongo/db/concurrency/exception_util.cpp index 880291b7da8..95242d3e299 100644 --- a/src/mongo/db/concurrency/exception_util.cpp +++ b/src/mongo/db/concurrency/exception_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/db/concurrency/exception_util.h" @@ -38,6 +37,9 @@ #include "mongo/util/duration.h" #include "mongo/util/log_and_backoff.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { MONGO_FAIL_POINT_DEFINE(skipWriteConflictRetries); diff --git a/src/mongo/db/concurrency/flow_control_ticketholder.cpp b/src/mongo/db/concurrency/flow_control_ticketholder.cpp index fc859abcbca..9a63acd290b 100644 --- a/src/mongo/db/concurrency/flow_control_ticketholder.cpp +++ b/src/mongo/db/concurrency/flow_control_ticketholder.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { const auto getFlowControlTicketholder = diff --git a/src/mongo/db/concurrency/lock_manager.cpp b/src/mongo/db/concurrency/lock_manager.cpp index 0737febeb25..4bd35cb207e 100644 --- a/src/mongo/db/concurrency/lock_manager.cpp +++ b/src/mongo/db/concurrency/lock_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -51,6 +50,9 @@ #include "mongo/util/str.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/db/concurrency/lock_state.cpp b/src/mongo/db/concurrency/lock_state.cpp index a968d2eee6e..9c46c6c1059 100644 --- a/src/mongo/db/concurrency/lock_state.cpp +++ b/src/mongo/db/concurrency/lock_state.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -52,6 +51,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { MONGO_FAIL_POINT_DEFINE(failNonIntentLocksIfWaitNeeded); diff --git a/src/mongo/db/concurrency/lock_state_test.cpp b/src/mongo/db/concurrency/lock_state_test.cpp index 32d819899e1..861afb3aa16 100644 --- a/src/mongo/db/concurrency/lock_state_test.cpp +++ b/src/mongo/db/concurrency/lock_state_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { class LockerImplTest : public ServiceContextTest {}; diff --git a/src/mongo/db/concurrency/replication_state_transition_lock_guard.cpp b/src/mongo/db/concurrency/replication_state_transition_lock_guard.cpp index 649dbce681d..394425e9a0d 100644 --- a/src/mongo/db/concurrency/replication_state_transition_lock_guard.cpp +++ b/src/mongo/db/concurrency/replication_state_transition_lock_guard.cpp @@ -27,13 +27,15 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" #include "mongo/db/concurrency/replication_state_transition_lock_guard.h" #include "mongo/db/operation_context.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp index 556128f6d87..17953399f68 100644 --- a/src/mongo/db/curop.cpp +++ b/src/mongo/db/curop.cpp @@ -29,7 +29,6 @@ // CHECK_LOG_REDACTION -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -61,6 +60,9 @@ #include "mongo/util/system_tick_source.h" #include <mongo/db/stats/timer_stats.h> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { using std::string; diff --git a/src/mongo/db/cursor_manager.cpp b/src/mongo/db/cursor_manager.cpp index d80a33e62ae..ea2ce3f969d 100644 --- a/src/mongo/db/cursor_manager.cpp +++ b/src/mongo/db/cursor_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -59,6 +58,9 @@ #include "mongo/platform/random.h" #include "mongo/util/exit.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { static Counter64 cursorStatsLifespanLessThan1Second; diff --git a/src/mongo/db/db_raii.cpp b/src/mongo/db/db_raii.cpp index 3a0b72f6bc8..7c02ea125d0 100644 --- a/src/mongo/db/db_raii.cpp +++ b/src/mongo/db/db_raii.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/db/storage/snapshot_helper.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + MONGO_FAIL_POINT_DEFINE(hangBeforeAutoGetShardVersionCheck); MONGO_FAIL_POINT_DEFINE(reachedAutoGetLockFreeShardConsistencyRetry); diff --git a/src/mongo/db/db_raii_multi_collection_test.cpp b/src/mongo/db/db_raii_multi_collection_test.cpp index f64224deb8a..1bbf3df0f62 100644 --- a/src/mongo/db/db_raii_multi_collection_test.cpp +++ b/src/mongo/db/db_raii_multi_collection_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/db_raii_test.cpp b/src/mongo/db/db_raii_test.cpp index 0e0ae201252..905cba46446 100644 --- a/src/mongo/db/db_raii_test.cpp +++ b/src/mongo/db/db_raii_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/dbdirectclient.cpp b/src/mongo/db/dbdirectclient.cpp index 479557afc7e..1304b97ad27 100644 --- a/src/mongo/db/dbdirectclient.cpp +++ b/src/mongo/db/dbdirectclient.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/transport/service_entry_point.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { using std::string; diff --git a/src/mongo/db/dbhelpers.cpp b/src/mongo/db/dbhelpers.cpp index 64412e5a2fd..40375b58ddb 100644 --- a/src/mongo/db/dbhelpers.cpp +++ b/src/mongo/db/dbhelpers.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -53,6 +52,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { using std::set; diff --git a/src/mongo/db/default_baton.cpp b/src/mongo/db/default_baton.cpp index 3f7e73fa59d..e1eeaea9a57 100644 --- a/src/mongo/db/default_baton.cpp +++ b/src/mongo/db/default_baton.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/db/operation_context.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/db/exec/batched_delete_stage.cpp b/src/mongo/db/exec/batched_delete_stage.cpp index 84ae6501c7c..c993157ba44 100644 --- a/src/mongo/db/exec/batched_delete_stage.cpp +++ b/src/mongo/db/exec/batched_delete_stage.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/s/pm2423_feature_flags_gen.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite + + namespace mongo { MONGO_FAIL_POINT_DEFINE(throwWriteConflictExceptionInBatchedDeleteStage); diff --git a/src/mongo/db/exec/batched_delete_stage_buffer.cpp b/src/mongo/db/exec/batched_delete_stage_buffer.cpp index 56617ad24ad..8d8575edd5f 100644 --- a/src/mongo/db/exec/batched_delete_stage_buffer.cpp +++ b/src/mongo/db/exec/batched_delete_stage_buffer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using namespace fmt::literals; diff --git a/src/mongo/db/exec/cached_plan.cpp b/src/mongo/db/exec/cached_plan.cpp index e60ed6962a9..67197c174ea 100644 --- a/src/mongo/db/exec/cached_plan.cpp +++ b/src/mongo/db/exec/cached_plan.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include "mongo/util/str.h" #include "mongo/util/transitional_tools_do_not_use/vector_spooling.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { // static diff --git a/src/mongo/db/exec/collection_scan.cpp b/src/mongo/db/exec/collection_scan.cpp index 506ce18d1ce..51e06abbace 100644 --- a/src/mongo/db/exec/collection_scan.cpp +++ b/src/mongo/db/exec/collection_scan.cpp @@ -28,7 +28,6 @@ */ #include "mongo/util/assert_util.h" -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/db/exec/collection_scan.h" @@ -47,6 +46,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using std::unique_ptr; diff --git a/src/mongo/db/exec/delete_stage.cpp b/src/mongo/db/exec/delete_stage.cpp index 83941b91c4e..43150dec4c9 100644 --- a/src/mongo/db/exec/delete_stage.cpp +++ b/src/mongo/db/exec/delete_stage.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite + + namespace mongo { using std::unique_ptr; diff --git a/src/mongo/db/exec/document_value/document_value_test.cpp b/src/mongo/db/exec/document_value/document_value_test.cpp index 421da707001..aee0844b164 100644 --- a/src/mongo/db/exec/document_value/document_value_test.cpp +++ b/src/mongo/db/exec/document_value/document_value_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include <math.h> #include <sstream> @@ -46,6 +45,9 @@ #include "mongo/dbtests/dbtests.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace DocumentTests { using std::numeric_limits; diff --git a/src/mongo/db/exec/geo_near.cpp b/src/mongo/db/exec/geo_near.cpp index d83f63a2677..4a960f88858 100644 --- a/src/mongo/db/exec/geo_near.cpp +++ b/src/mongo/db/exec/geo_near.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/db/exec/geo_near.h" @@ -51,6 +50,9 @@ #include <algorithm> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using std::abs; diff --git a/src/mongo/db/exec/inclusion_projection_executor_test.cpp b/src/mongo/db/exec/inclusion_projection_executor_test.cpp index 84ed31a9bb4..f11db107be4 100644 --- a/src/mongo/db/exec/inclusion_projection_executor_test.cpp +++ b/src/mongo/db/exec/inclusion_projection_executor_test.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo::projection_executor { namespace { using std::vector; diff --git a/src/mongo/db/exec/index_scan.cpp b/src/mongo/db/exec/index_scan.cpp index 06399c4e33b..9b9c4455d96 100644 --- a/src/mongo/db/exec/index_scan.cpp +++ b/src/mongo/db/exec/index_scan.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/db/index_names.h" #include "mongo/db/query/index_bounds_builder.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace { // Return a value in the set {-1, 0, 1} to represent the sign of parameter i. diff --git a/src/mongo/db/exec/multi_plan.cpp b/src/mongo/db/exec/multi_plan.cpp index 36e614e6675..397393c8cd5 100644 --- a/src/mongo/db/exec/multi_plan.cpp +++ b/src/mongo/db/exec/multi_plan.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include "mongo/util/histogram.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using std::unique_ptr; diff --git a/src/mongo/db/exec/plan_cache_util.cpp b/src/mongo/db/exec/plan_cache_util.cpp index 80b9ece6f42..5ae08d72981 100644 --- a/src/mongo/db/exec/plan_cache_util.cpp +++ b/src/mongo/db/exec/plan_cache_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/db/query/canonical_query_encoder.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace plan_cache_util { namespace log_detail { diff --git a/src/mongo/db/exec/plan_stage.cpp b/src/mongo/db/exec/plan_stage.cpp index 2787d63cf47..fdff4638d17 100644 --- a/src/mongo/db/exec/plan_stage.cpp +++ b/src/mongo/db/exec/plan_stage.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/db/operation_context.h" #include "mongo/db/service_context.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { void PlanStage::saveState() { ++_commonStats.yields; diff --git a/src/mongo/db/exec/projection_executor_builder_test.cpp b/src/mongo/db/exec/projection_executor_builder_test.cpp index 0fde4ad2db3..63923886cb7 100644 --- a/src/mongo/db/exec/projection_executor_builder_test.cpp +++ b/src/mongo/db/exec/projection_executor_builder_test.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo::projection_executor { namespace { /** diff --git a/src/mongo/db/exec/return_key.cpp b/src/mongo/db/exec/return_key.cpp index ed8c0a4d3b2..a620fb8e5a5 100644 --- a/src/mongo/db/exec/return_key.cpp +++ b/src/mongo/db/exec/return_key.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/db/pipeline/field_path.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { PlanStage::StageState ReturnKeyStage::doWork(WorkingSetID* out) { WorkingSetID id = WorkingSet::INVALID_ID; diff --git a/src/mongo/db/exec/sample_from_timeseries_bucket.cpp b/src/mongo/db/exec/sample_from_timeseries_bucket.cpp index f74e84d9ae2..a308c61bc7f 100644 --- a/src/mongo/db/exec/sample_from_timeseries_bucket.cpp +++ b/src/mongo/db/exec/sample_from_timeseries_bucket.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/db/exec/sample_from_timeseries_bucket.h" #include "mongo/db/exec/shard_filterer.h" @@ -35,6 +34,9 @@ #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { const char* SampleFromTimeseriesBucket::kStageType = "SAMPLE_FROM_TIMESERIES_BUCKET"; diff --git a/src/mongo/db/exec/sbe/sbe_plan_stage_test.cpp b/src/mongo/db/exec/sbe/sbe_plan_stage_test.cpp index 66bd9b9fe6b..c2312e19fcd 100644 --- a/src/mongo/db/exec/sbe/sbe_plan_stage_test.cpp +++ b/src/mongo/db/exec/sbe/sbe_plan_stage_test.cpp @@ -30,7 +30,6 @@ /** * This file contains a test framework for testing sbe::PlanStages. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/db/concurrency/locker_noop_client_observer.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo::sbe { void PlanStageTestFixture::assertValuesEqual(value::TypeTags lhsTag, diff --git a/src/mongo/db/exec/sbe/values/columnar.cpp b/src/mongo/db/exec/sbe/values/columnar.cpp index 1db52e0263e..72a619f4bc8 100644 --- a/src/mongo/db/exec/sbe/values/columnar.cpp +++ b/src/mongo/db/exec/sbe/values/columnar.cpp @@ -26,13 +26,15 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" #include "mongo/db/exec/sbe/values/columnar.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo::sbe { namespace { // While reconstructing an object, it may be necessary to leave placeholders that are diff --git a/src/mongo/db/exec/sbe/vm/vm.cpp b/src/mongo/db/exec/sbe/vm/vm.cpp index 9b7e714aeb2..e5fc2b467cc 100644 --- a/src/mongo/db/exec/sbe/vm/vm.cpp +++ b/src/mongo/db/exec/sbe/vm/vm.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -57,6 +56,9 @@ #include "mongo/util/str.h" #include "mongo/util/summation.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + MONGO_FAIL_POINT_DEFINE(failOnPoisonedFieldLookup); namespace mongo { diff --git a/src/mongo/db/exec/shard_filter.cpp b/src/mongo/db/exec/shard_filter.cpp index 19c8ad4cbb2..82a0d9328ab 100644 --- a/src/mongo/db/exec/shard_filter.cpp +++ b/src/mongo/db/exec/shard_filter.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/shard_key_pattern.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using std::shared_ptr; diff --git a/src/mongo/db/exec/sort_key_generator.cpp b/src/mongo/db/exec/sort_key_generator.cpp index b62a0c93d9e..922ea05ca1e 100644 --- a/src/mongo/db/exec/sort_key_generator.cpp +++ b/src/mongo/db/exec/sort_key_generator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/db/matcher/extensions_callback_noop.h" #include "mongo/db/query/collation/collator_interface.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { const char* SortKeyGeneratorStage::kStageType = "SORT_KEY_GENERATOR"; diff --git a/src/mongo/db/exec/update_stage.cpp b/src/mongo/db/exec/update_stage.cpp index 5a273dc2d89..500ba42ca1f 100644 --- a/src/mongo/db/exec/update_stage.cpp +++ b/src/mongo/db/exec/update_stage.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite #include "mongo/platform/basic.h" @@ -64,6 +63,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite + + namespace mongo { MONGO_FAIL_POINT_DEFINE(hangBeforeThrowWouldChangeOwningShard); diff --git a/src/mongo/db/exec/working_set_common.cpp b/src/mongo/db/exec/working_set_common.cpp index 1a1a04cade6..7a23368b02f 100644 --- a/src/mongo/db/exec/working_set_common.cpp +++ b/src/mongo/db/exec/working_set_common.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/db/storage/index_entry_comparison.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { diff --git a/src/mongo/db/exec/write_stage_common.cpp b/src/mongo/db/exec/write_stage_common.cpp index 88bace435fb..0a1ed4179aa 100644 --- a/src/mongo/db/exec/write_stage_common.cpp +++ b/src/mongo/db/exec/write_stage_common.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite #include "mongo/db/exec/write_stage_common.h" @@ -42,6 +41,9 @@ #include "mongo/logv2/redaction.h" #include "mongo/s/pm2423_feature_flags_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite + + namespace mongo { namespace { diff --git a/src/mongo/db/exhaust_cursor_currentop_integration_test.cpp b/src/mongo/db/exhaust_cursor_currentop_integration_test.cpp index 168107cb11d..df60b317eb2 100644 --- a/src/mongo/db/exhaust_cursor_currentop_integration_test.cpp +++ b/src/mongo/db/exhaust_cursor_currentop_integration_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/system_clock_source.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { // Specifies the amount of time we are willing to wait for a parallel operation to complete. diff --git a/src/mongo/db/fcv_op_observer.cpp b/src/mongo/db/fcv_op_observer.cpp index 8815b7af81e..956ff469b32 100644 --- a/src/mongo/db/fcv_op_observer.cpp +++ b/src/mongo/db/fcv_op_observer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { MONGO_FAIL_POINT_DEFINE(pauseBeforeCloseCxns); MONGO_FAIL_POINT_DEFINE(finishedDropConnections); diff --git a/src/mongo/db/fle_crud.cpp b/src/mongo/db/fle_crud.cpp index 8c7f178bfc0..eaf0372c2fe 100644 --- a/src/mongo/db/fle_crud.cpp +++ b/src/mongo/db/fle_crud.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite #include "mongo/db/fle_crud.h" @@ -57,6 +56,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/concurrency/thread_pool.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite + + MONGO_FAIL_POINT_DEFINE(fleCrudHangInsert); MONGO_FAIL_POINT_DEFINE(fleCrudHangPreInsert); diff --git a/src/mongo/db/free_mon/free_mon_controller.cpp b/src/mongo/db/free_mon/free_mon_controller.cpp index 8c3565a8a11..d18287ecb02 100644 --- a/src/mongo/db/free_mon/free_mon_controller.cpp +++ b/src/mongo/db/free_mon/free_mon_controller.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/db/free_mon/free_mon_controller_test.cpp b/src/mongo/db/free_mon/free_mon_controller_test.cpp index e074e73c7f0..be3e5bda729 100644 --- a/src/mongo/db/free_mon/free_mon_controller_test.cpp +++ b/src/mongo/db/free_mon/free_mon_controller_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -69,6 +68,8 @@ #include "mongo/util/clock_source.h" #include "mongo/util/hex.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + namespace mongo { namespace { diff --git a/src/mongo/db/free_mon/free_mon_mongod.cpp b/src/mongo/db/free_mon/free_mon_mongod.cpp index eda9f8487ee..9e52bd45446 100644 --- a/src/mongo/db/free_mon/free_mon_mongod.cpp +++ b/src/mongo/db/free_mon/free_mon_mongod.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -67,6 +66,9 @@ #include "mongo/util/net/http_client.h" #include "mongo/util/testing_proctor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/db/free_mon/free_mon_options.cpp b/src/mongo/db/free_mon/free_mon_options.cpp index df1255e1200..71196ba2306 100644 --- a/src/mongo/db/free_mon/free_mon_options.cpp +++ b/src/mongo/db/free_mon/free_mon_options.cpp @@ -27,8 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC - #include "mongo/platform/basic.h" @@ -41,6 +39,9 @@ #include "mongo/util/options_parser/startup_option_init.h" #include "mongo/util/options_parser/startup_options.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC + + namespace mongo { FreeMonParams globalFreeMonParams; diff --git a/src/mongo/db/free_mon/free_mon_processor.cpp b/src/mongo/db/free_mon/free_mon_processor.cpp index c91d62204b8..247e1c131a8 100644 --- a/src/mongo/db/free_mon/free_mon_processor.cpp +++ b/src/mongo/db/free_mon/free_mon_processor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/db/ftdc/controller.cpp b/src/mongo/db/ftdc/controller.cpp index 907186b076b..c2c409be1d8 100644 --- a/src/mongo/db/ftdc/controller.cpp +++ b/src/mongo/db/ftdc/controller.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/util/exit.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC + + namespace mongo { Status FTDCController::setEnabled(bool enabled) { diff --git a/src/mongo/db/ftdc/file_manager.cpp b/src/mongo/db/ftdc/file_manager.cpp index 9316a89dcfc..4b1286327be 100644 --- a/src/mongo/db/ftdc/file_manager.cpp +++ b/src/mongo/db/ftdc/file_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/util/str.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC + + namespace mongo { FTDCFileManager::FTDCFileManager(const FTDCConfig* config, diff --git a/src/mongo/db/ftdc/file_manager_test.cpp b/src/mongo/db/ftdc/file_manager_test.cpp index 908389f6e62..9d944e9a0a4 100644 --- a/src/mongo/db/ftdc/file_manager_test.cpp +++ b/src/mongo/db/ftdc/file_manager_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -52,6 +51,9 @@ #include "mongo/unittest/temp_dir.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { class FTDCFileManagerTest : public ServiceContextTest {}; diff --git a/src/mongo/db/ftdc/ftdc_mongos.cpp b/src/mongo/db/ftdc/ftdc_mongos.cpp index 0843e8d3dfc..53216762137 100644 --- a/src/mongo/db/ftdc/ftdc_mongos.cpp +++ b/src/mongo/db/ftdc/ftdc_mongos.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/stdx/thread.h" #include "mongo/util/synchronized_value.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC + + namespace mongo { class ConnPoolStatsCollector : public FTDCCollectorInterface { diff --git a/src/mongo/db/ftdc/ftdc_system_stats_windows.cpp b/src/mongo/db/ftdc/ftdc_system_stats_windows.cpp index eb877638a7b..e1ab14bf9f8 100644 --- a/src/mongo/db/ftdc/ftdc_system_stats_windows.cpp +++ b/src/mongo/db/ftdc/ftdc_system_stats_windows.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/perfctr_collect.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC + + namespace mongo { namespace { diff --git a/src/mongo/db/ftdc/util.cpp b/src/mongo/db/ftdc/util.cpp index e3b52800c03..811bec1c8dc 100644 --- a/src/mongo/db/ftdc/util.cpp +++ b/src/mongo/db/ftdc/util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/util/str.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC + + namespace mongo { const char kFTDCInterimFile[] = "metrics.interim"; diff --git a/src/mongo/db/fts/fts_index_format_test.cpp b/src/mongo/db/fts/fts_index_format_test.cpp index 9c40895de01..34e180bbc30 100644 --- a/src/mongo/db/fts/fts_index_format_test.cpp +++ b/src/mongo/db/fts/fts_index_format_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace fts { diff --git a/src/mongo/db/geo/geometry_container.cpp b/src/mongo/db/geo/geometry_container.cpp index c3c3adaa1b2..e34ad35c9a2 100644 --- a/src/mongo/db/geo/geometry_container.cpp +++ b/src/mongo/db/geo/geometry_container.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/db/geo/geometry_container.h" @@ -37,6 +36,9 @@ #include "mongo/util/str.h" #include "mongo/util/transitional_tools_do_not_use/vector_spooling.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { bool GeometryContainer::isSimpleContainer() const { diff --git a/src/mongo/db/geo/geoparser.cpp b/src/mongo/db/geo/geoparser.cpp index 005f6defef2..57e2fbee611 100644 --- a/src/mongo/db/geo/geoparser.cpp +++ b/src/mongo/db/geo/geoparser.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kGeo #include "mongo/db/geo/geoparser.h" @@ -43,6 +42,9 @@ #include "mongo/util/transitional_tools_do_not_use/vector_spooling.h" #include "third_party/s2/s2polygonbuilder.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kGeo + + #define BAD_VALUE(error) Status(ErrorCodes::BadValue, str::stream() << error) namespace mongo { diff --git a/src/mongo/db/geo/r2_region_coverer.cpp b/src/mongo/db/geo/r2_region_coverer.cpp index 155546266b2..9a0364495e0 100644 --- a/src/mongo/db/geo/r2_region_coverer.cpp +++ b/src/mongo/db/geo/r2_region_coverer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include <algorithm> @@ -37,6 +36,9 @@ #include "mongo/db/geo/shapes.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using std::less; diff --git a/src/mongo/db/geo/r2_region_coverer_test.cpp b/src/mongo/db/geo/r2_region_coverer_test.cpp index 0a499f2a74a..4287a3fbc5e 100644 --- a/src/mongo/db/geo/r2_region_coverer_test.cpp +++ b/src/mongo/db/geo/r2_region_coverer_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include <chrono> #include <memory> @@ -42,6 +41,9 @@ #include "mongo/platform/random.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace { using namespace mongo; diff --git a/src/mongo/db/index/2d_key_generator_test.cpp b/src/mongo/db/index/2d_key_generator_test.cpp index 9396811ab2d..1f12859b415 100644 --- a/src/mongo/db/index/2d_key_generator_test.cpp +++ b/src/mongo/db/index/2d_key_generator_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + using namespace mongo; namespace { diff --git a/src/mongo/db/index/btree_key_generator_test.cpp b/src/mongo/db/index/btree_key_generator_test.cpp index 0ccbc497d6f..50efff709a2 100644 --- a/src/mongo/db/index/btree_key_generator_test.cpp +++ b/src/mongo/db/index/btree_key_generator_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + using namespace mongo; using std::cout; using std::endl; diff --git a/src/mongo/db/index/column_cell.cpp b/src/mongo/db/index/column_cell.cpp index 0d32745be3e..455918d0cab 100644 --- a/src/mongo/db/index/column_cell.cpp +++ b/src/mongo/db/index/column_cell.cpp @@ -27,12 +27,14 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/db/index/column_cell.h" #include "mongo/db/storage/column_store.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace column_keygen { namespace { diff --git a/src/mongo/db/index/column_key_generator.cpp b/src/mongo/db/index/column_key_generator.cpp index 7dcbfea4e72..aae01066cec 100644 --- a/src/mongo/db/index/column_key_generator.cpp +++ b/src/mongo/db/index/column_key_generator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/util/functional.h" #include "mongo/util/string_map.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace mongo::column_keygen { namespace { diff --git a/src/mongo/db/index/columns_access_method.cpp b/src/mongo/db/index/columns_access_method.cpp index 53bbd42a7fb..e6ecfc8de0e 100644 --- a/src/mongo/db/index/columns_access_method.cpp +++ b/src/mongo/db/index/columns_access_method.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/db/index/columns_access_method.h" @@ -42,6 +41,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/progress_meter.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace mongo { ColumnStoreAccessMethod::ColumnStoreAccessMethod(IndexCatalogEntry* ice, std::unique_ptr<ColumnStore> store) diff --git a/src/mongo/db/index/duplicate_key_tracker.cpp b/src/mongo/db/index/duplicate_key_tracker.cpp index 3b6709bad75..6a63b839928 100644 --- a/src/mongo/db/index/duplicate_key_tracker.cpp +++ b/src/mongo/db/index/duplicate_key_tracker.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace mongo { namespace { diff --git a/src/mongo/db/index/expression_keys_private.cpp b/src/mongo/db/index/expression_keys_private.cpp index 3d957f15519..845e65c4b65 100644 --- a/src/mongo/db/index/expression_keys_private.cpp +++ b/src/mongo/db/index/expression_keys_private.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/db/index/expression_keys_private.h" @@ -57,6 +56,9 @@ #include "third_party/s2/s2cell.h" #include "third_party/s2/s2regioncoverer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace { using namespace mongo; diff --git a/src/mongo/db/index/hash_key_generator_test.cpp b/src/mongo/db/index/hash_key_generator_test.cpp index 8cbeabcaae8..3bdada24c8a 100644 --- a/src/mongo/db/index/hash_key_generator_test.cpp +++ b/src/mongo/db/index/hash_key_generator_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + using namespace mongo; namespace { diff --git a/src/mongo/db/index/index_access_method.cpp b/src/mongo/db/index/index_access_method.cpp index 8f4ab86a762..150558bfb69 100644 --- a/src/mongo/db/index/index_access_method.cpp +++ b/src/mongo/db/index/index_access_method.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/platform/basic.h" @@ -60,6 +59,8 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/stacktrace.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + namespace mongo { using std::pair; @@ -1225,5 +1226,7 @@ void SortedDataIndexAccessMethod::_unindexKeysOrWriteToSideTable( } // namespace mongo +#undef MONGO_LOGV2_DEFAULT_COMPONENT #include "mongo/db/sorter/sorter.cpp" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand MONGO_CREATE_SORTER(mongo::KeyString::Value, mongo::NullValue, mongo::BtreeExternalSortComparison); diff --git a/src/mongo/db/index/index_access_method_factory_impl.cpp b/src/mongo/db/index/index_access_method_factory_impl.cpp index 31c313379fc..e027154ba9e 100644 --- a/src/mongo/db/index/index_access_method_factory_impl.cpp +++ b/src/mongo/db/index/index_access_method_factory_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/db/storage/kv/kv_engine.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace mongo { std::unique_ptr<IndexAccessMethod> IndexAccessMethodFactoryImpl::make( diff --git a/src/mongo/db/index/index_build_interceptor.cpp b/src/mongo/db/index/index_build_interceptor.cpp index 4e04d0a2c3f..df708587511 100644 --- a/src/mongo/db/index/index_build_interceptor.cpp +++ b/src/mongo/db/index/index_build_interceptor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/util/progress_meter.h" #include "mongo/util/uuid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace mongo { MONGO_FAIL_POINT_DEFINE(hangDuringIndexBuildDrainYield); diff --git a/src/mongo/db/index/index_descriptor.cpp b/src/mongo/db/index/index_descriptor.cpp index 3f4dbd088ed..2d33a32d84b 100644 --- a/src/mongo/db/index/index_descriptor.cpp +++ b/src/mongo/db/index/index_descriptor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/db/server_options.h" #include "mongo/db/storage/storage_parameters_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace mongo { using IndexVersion = IndexDescriptor::IndexVersion; diff --git a/src/mongo/db/index/s2_access_method.cpp b/src/mongo/db/index/s2_access_method.cpp index 0bced692f3c..a2ea40dd9b1 100644 --- a/src/mongo/db/index/s2_access_method.cpp +++ b/src/mongo/db/index/s2_access_method.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/db/index/s2_access_method.h" @@ -43,6 +42,9 @@ #include "mongo/db/jsobj.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace mongo { static const string kIndexVersionFieldName("2dsphereIndexVersion"); diff --git a/src/mongo/db/index/s2_bucket_access_method.cpp b/src/mongo/db/index/s2_bucket_access_method.cpp index f838ad2a5e8..0da4cdc6f63 100644 --- a/src/mongo/db/index/s2_bucket_access_method.cpp +++ b/src/mongo/db/index/s2_bucket_access_method.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/db/index/s2_bucket_access_method.h" @@ -43,6 +42,9 @@ #include "mongo/db/jsobj.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace mongo { static const string kIndexVersionFieldName("2dsphereIndexVersion"); diff --git a/src/mongo/db/index/s2_bucket_key_generator_test.cpp b/src/mongo/db/index/s2_bucket_key_generator_test.cpp index 89187d275b0..11a3515a6a2 100644 --- a/src/mongo/db/index/s2_bucket_key_generator_test.cpp +++ b/src/mongo/db/index/s2_bucket_key_generator_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + using namespace mongo; namespace { diff --git a/src/mongo/db/index/s2_key_generator_test.cpp b/src/mongo/db/index/s2_key_generator_test.cpp index e3e027049ac..23a321ddc68 100644 --- a/src/mongo/db/index/s2_key_generator_test.cpp +++ b/src/mongo/db/index/s2_key_generator_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + using namespace mongo; namespace { diff --git a/src/mongo/db/index/skipped_record_tracker.cpp b/src/mongo/db/index/skipped_record_tracker.cpp index ebbc7b97516..2b82f1603b7 100644 --- a/src/mongo/db/index/skipped_record_tracker.cpp +++ b/src/mongo/db/index/skipped_record_tracker.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/db/index/skipped_record_tracker.h" @@ -39,6 +38,9 @@ #include "mongo/db/storage/execution_context.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace mongo { namespace { static constexpr StringData kRecordIdField = "recordId"_sd; diff --git a/src/mongo/db/index/wildcard_key_generator_test.cpp b/src/mongo/db/index/wildcard_key_generator_test.cpp index 55c20f06060..3747df8e2ba 100644 --- a/src/mongo/db/index/wildcard_key_generator_test.cpp +++ b/src/mongo/db/index/wildcard_key_generator_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/index_build_entry_helpers.cpp b/src/mongo/db/index_build_entry_helpers.cpp index 1004ded65b4..5c90ce38388 100644 --- a/src/mongo/db/index_build_entry_helpers.cpp +++ b/src/mongo/db/index_build_entry_helpers.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/index_builds_coordinator.cpp b/src/mongo/db/index_builds_coordinator.cpp index fd81a15c482..fa8ab7edbd5 100644 --- a/src/mongo/db/index_builds_coordinator.cpp +++ b/src/mongo/db/index_builds_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -71,6 +70,9 @@ #include <boost/filesystem/operations.hpp> #include <boost/iterator/transform_iterator.hpp> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { MONGO_FAIL_POINT_DEFINE(hangAfterIndexBuildFirstDrain); diff --git a/src/mongo/db/index_builds_coordinator_mongod.cpp b/src/mongo/db/index_builds_coordinator_mongod.cpp index efa563e6b03..a99c5f05173 100644 --- a/src/mongo/db/index_builds_coordinator_mongod.cpp +++ b/src/mongo/db/index_builds_coordinator_mongod.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -59,6 +58,9 @@ #include "mongo/util/scoped_counter.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/initialize_server_global_state.cpp b/src/mongo/db/initialize_server_global_state.cpp index 340ad49d7e9..e37d6809049 100644 --- a/src/mongo/db/initialize_server_global_state.cpp +++ b/src/mongo/db/initialize_server_global_state.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -62,6 +61,9 @@ #include <TargetConditionals.h> #endif +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { #ifndef _WIN32 diff --git a/src/mongo/db/internal_session_pool.cpp b/src/mongo/db/internal_session_pool.cpp index ab94050f22b..d700746f374 100644 --- a/src/mongo/db/internal_session_pool.cpp +++ b/src/mongo/db/internal_session_pool.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { const auto serviceDecorator = ServiceContext::declareDecoration<InternalSessionPool>(); diff --git a/src/mongo/db/introspect.cpp b/src/mongo/db/introspect.cpp index 18608a8dad0..2a8db9e64a8 100644 --- a/src/mongo/db/introspect.cpp +++ b/src/mongo/db/introspect.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/rpc/metadata/client_metadata.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { using std::endl; diff --git a/src/mongo/db/keys_collection_client_direct.cpp b/src/mongo/db/keys_collection_client_direct.cpp index 30048be948b..1879765beb7 100644 --- a/src/mongo/db/keys_collection_client_direct.cpp +++ b/src/mongo/db/keys_collection_client_direct.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/s/write_ops/batched_command_request.h" #include "mongo/s/write_ops/batched_command_response.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace { diff --git a/src/mongo/db/keys_collection_manager.cpp b/src/mongo/db/keys_collection_manager.cpp index e1788f2ccd5..31e97291948 100644 --- a/src/mongo/db/keys_collection_manager.cpp +++ b/src/mongo/db/keys_collection_manager.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/util/str.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { const std::string KeysCollectionManager::kKeyManagerPurposeString = "HMAC"; diff --git a/src/mongo/db/kill_sessions_common.cpp b/src/mongo/db/kill_sessions_common.cpp index 0433935f5d5..a26c3c9fd5e 100644 --- a/src/mongo/db/kill_sessions_common.cpp +++ b/src/mongo/db/kill_sessions_common.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/metadata/client_metadata.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { SessionKiller::Result killSessionsLocalKillOps(OperationContext* opCtx, diff --git a/src/mongo/db/kill_sessions_local.cpp b/src/mongo/db/kill_sessions_local.cpp index f8b235c4d2c..2c4f2089413 100644 --- a/src/mongo/db/kill_sessions_local.cpp +++ b/src/mongo/db/kill_sessions_local.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/db/transaction_participant.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/log_process_details.cpp b/src/mongo/db/log_process_details.cpp index 586b78694b0..c35b6ae33d6 100644 --- a/src/mongo/db/log_process_details.cpp +++ b/src/mongo/db/log_process_details.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/util/processinfo.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/db/logical_session_cache_factory_mongod.cpp b/src/mongo/db/logical_session_cache_factory_mongod.cpp index e79f0e3fbdb..a1bedbced6b 100644 --- a/src/mongo/db/logical_session_cache_factory_mongod.cpp +++ b/src/mongo/db/logical_session_cache_factory_mongod.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/db/sessions_collection_standalone.h" #include "mongo/s/sessions_collection_sharded.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { std::unique_ptr<LogicalSessionCache> makeLogicalSessionCacheD(LogicalSessionCacheServer state) { diff --git a/src/mongo/db/logical_session_cache_impl.cpp b/src/mongo/db/logical_session_cache_impl.cpp index 2f42b90960f..399119b0fb1 100644 --- a/src/mongo/db/logical_session_cache_impl.cpp +++ b/src/mongo/db/logical_session_cache_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/util/duration.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/db/logical_time_validator.cpp b/src/mongo/db/logical_time_validator.cpp index 2b65ad4470c..d09867f6151 100644 --- a/src/mongo/db/logical_time_validator.cpp +++ b/src/mongo/db/logical_time_validator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace { diff --git a/src/mongo/db/matcher/expression_geo.cpp b/src/mongo/db/matcher/expression_geo.cpp index fe592df742e..eb47d3db124 100644 --- a/src/mongo/db/matcher/expression_geo.cpp +++ b/src/mongo/db/matcher/expression_geo.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/db/matcher/expression_geo.h" @@ -38,6 +37,9 @@ #include "mongo/platform/basic.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { // diff --git a/src/mongo/db/matcher/rewrite_expr.cpp b/src/mongo/db/matcher/rewrite_expr.cpp index e61ddeaab78..cd82adb7cd0 100644 --- a/src/mongo/db/matcher/rewrite_expr.cpp +++ b/src/mongo/db/matcher/rewrite_expr.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/db/matcher/expression_tree.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using CmpOp = ExpressionCompare::CmpOp; diff --git a/src/mongo/db/matcher/schema/json_schema_parser.cpp b/src/mongo/db/matcher/schema/json_schema_parser.cpp index f9bec08e882..dab65bab837 100644 --- a/src/mongo/db/matcher/schema/json_schema_parser.cpp +++ b/src/mongo/db/matcher/schema/json_schema_parser.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -64,6 +63,9 @@ #include "mongo/logv2/log_component_settings.h" #include "mongo/util/string_map.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using PatternSchema = InternalSchemaAllowedPropertiesMatchExpression::PatternSchema; diff --git a/src/mongo/db/mirror_maestro.cpp b/src/mongo/db/mirror_maestro.cpp index b586b332b02..303a7cc0af9 100644 --- a/src/mongo/db/mirror_maestro.cpp +++ b/src/mongo/db/mirror_maestro.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -58,6 +57,9 @@ #include "mongo/util/concurrency/thread_pool.h" #include "mongo/util/synchronized_value.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp index 3f365e8b921..4a56347bf5a 100644 --- a/src/mongo/db/mongod_main.cpp +++ b/src/mongo/db/mongod_main.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -231,6 +230,9 @@ #include <sys/file.h> #endif +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { using logv2::LogComponent; diff --git a/src/mongo/db/mongod_options.cpp b/src/mongo/db/mongod_options.cpp index 9ef47d3fcde..48099fb01e5 100644 --- a/src/mongo/db/mongod_options.cpp +++ b/src/mongo/db/mongod_options.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/db/mongod_options.h" @@ -64,6 +63,9 @@ #include "mongo/util/str.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { using std::endl; diff --git a/src/mongo/db/multitenancy.cpp b/src/mongo/db/multitenancy.cpp index 59d13f1c748..27ced8eee24 100644 --- a/src/mongo/db/multitenancy.cpp +++ b/src/mongo/db/multitenancy.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/db/multitenancy.h" @@ -36,6 +35,9 @@ #include "mongo/db/tenant_id.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { // Holds the tenantId for the operation if it was provided in the request on the $tenant field only diff --git a/src/mongo/db/op_msg_fuzzer_fixture_test.cpp b/src/mongo/db/op_msg_fuzzer_fixture_test.cpp index 481bf28cbbd..28e0a705231 100644 --- a/src/mongo/db/op_msg_fuzzer_fixture_test.cpp +++ b/src/mongo/db/op_msg_fuzzer_fixture_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/rpc/op_msg.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/op_observer_impl.cpp b/src/mongo/db/op_observer_impl.cpp index 07f051e1434..3b4bd531e1a 100644 --- a/src/mongo/db/op_observer_impl.cpp +++ b/src/mongo/db/op_observer_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -80,6 +79,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { using repl::DurableOplogEntry; using repl::MutableOplogEntry; diff --git a/src/mongo/db/op_observer_impl_test.cpp b/src/mongo/db/op_observer_impl_test.cpp index dddf74d3e88..8c2a891f996 100644 --- a/src/mongo/db/op_observer_impl_test.cpp +++ b/src/mongo/db/op_observer_impl_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -68,6 +67,9 @@ #include "mongo/unittest/death_test.h" #include "mongo/util/clock_source_mock.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/operation_context.cpp b/src/mongo/db/operation_context.cpp index 649ad363b0c..9c463b9688f 100644 --- a/src/mongo/db/operation_context.cpp +++ b/src/mongo/db/operation_context.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/system_tick_source.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { MONGO_FAIL_POINT_DEFINE(maxTimeAlwaysTimeOut); diff --git a/src/mongo/db/operation_context_test.cpp b/src/mongo/db/operation_context_test.cpp index 825afda8cae..1e9d418630e 100644 --- a/src/mongo/db/operation_context_test.cpp +++ b/src/mongo/db/operation_context_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -53,6 +52,9 @@ #include "mongo/util/tick_source_mock.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/operation_cpu_timer.cpp b/src/mongo/db/operation_cpu_timer.cpp index f37f0b99da4..e9ed49c2a62 100644 --- a/src/mongo/db/operation_cpu_timer.cpp +++ b/src/mongo/db/operation_cpu_timer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include <boost/optional.hpp> #include <fmt/format.h> @@ -47,6 +46,9 @@ #include "mongo/util/errno_util.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { using namespace fmt::literals; diff --git a/src/mongo/db/operation_cpu_timer_test.cpp b/src/mongo/db/operation_cpu_timer_test.cpp index 8d579e9937c..34c1f1301a3 100644 --- a/src/mongo/db/operation_cpu_timer_test.cpp +++ b/src/mongo/db/operation_cpu_timer_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/db/operation_cpu_timer.h" #include "mongo/db/service_context_test_fixture.h" @@ -41,6 +40,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { class OperationCPUTimerTest : public ServiceContextTest { diff --git a/src/mongo/db/operation_id_test.cpp b/src/mongo/db/operation_id_test.cpp index 825891d90ae..ff27050e26e 100644 --- a/src/mongo/db/operation_id_test.cpp +++ b/src/mongo/db/operation_id_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/unittest/death_test.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/operation_key_manager.cpp b/src/mongo/db/operation_key_manager.cpp index 51a1e41ac31..57bdde47ae9 100644 --- a/src/mongo/db/operation_key_manager.cpp +++ b/src/mongo/db/operation_key_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { auto getOpKeyManager = ServiceContext::declareDecoration<OperationKeyManager>(); diff --git a/src/mongo/db/operation_killer.cpp b/src/mongo/db/operation_killer.cpp index 66aec3836a6..a49359a3417 100644 --- a/src/mongo/db/operation_killer.cpp +++ b/src/mongo/db/operation_killer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { OperationKiller::OperationKiller(Client* myClient) : _myClient(myClient) { diff --git a/src/mongo/db/ops/parsed_delete.cpp b/src/mongo/db/ops/parsed_delete.cpp index 22294b96e31..980d11d8f1b 100644 --- a/src/mongo/db/ops/parsed_delete.cpp +++ b/src/mongo/db/ops/parsed_delete.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite + + namespace mongo { ParsedDelete::ParsedDelete(OperationContext* opCtx, const DeleteRequest* request) diff --git a/src/mongo/db/ops/update.cpp b/src/mongo/db/ops/update.cpp index 24f25c834d3..b949dbbfcbe 100644 --- a/src/mongo/db/ops/update.cpp +++ b/src/mongo/db/ops/update.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite #include "mongo/platform/basic.h" @@ -51,6 +50,9 @@ #include "mongo/db/update_index_data.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite + + namespace mongo { UpdateResult update(OperationContext* opCtx, Database* db, const UpdateRequest& request) { diff --git a/src/mongo/db/ops/update_result.cpp b/src/mongo/db/ops/update_result.cpp index 762ff704e06..3058e59460a 100644 --- a/src/mongo/db/ops/update_result.cpp +++ b/src/mongo/db/ops/update_result.cpp @@ -28,8 +28,6 @@ */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite - #include "mongo/platform/basic.h" #include "mongo/db/ops/update_result.h" @@ -38,6 +36,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite + + namespace mongo { UpdateResult::UpdateResult(bool existing, diff --git a/src/mongo/db/ops/write_ops_exec.cpp b/src/mongo/db/ops/write_ops_exec.cpp index 315213a1948..8b63918ac42 100644 --- a/src/mongo/db/ops/write_ops_exec.cpp +++ b/src/mongo/db/ops/write_ops_exec.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite #include "mongo/platform/basic.h" @@ -95,6 +94,9 @@ #include "mongo/util/log_and_backoff.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite + + namespace mongo::write_ops_exec { // Convention in this file: generic helpers go in the anonymous namespace. Helpers that are for a diff --git a/src/mongo/db/ops/write_ops_retryability.cpp b/src/mongo/db/ops/write_ops_retryability.cpp index 1f1c28cda28..084bc14d5dc 100644 --- a/src/mongo/db/ops/write_ops_retryability.cpp +++ b/src/mongo/db/ops/write_ops_retryability.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/logv2/redaction.h" #include "mongo/stdx/mutex.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/periodic_runner_job_abort_expired_transactions.cpp b/src/mongo/db/periodic_runner_job_abort_expired_transactions.cpp index 52568382913..cb1f07f058e 100644 --- a/src/mongo/db/periodic_runner_job_abort_expired_transactions.cpp +++ b/src/mongo/db/periodic_runner_job_abort_expired_transactions.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/periodic_runner.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/pipeline/accumulator_test.cpp b/src/mongo/db/pipeline/accumulator_test.cpp index d0e40c192ca..5c029fa3575 100644 --- a/src/mongo/db/pipeline/accumulator_test.cpp +++ b/src/mongo/db/pipeline/accumulator_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/idl/server_parameter_test_util.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace AccumulatorTests { using boost::intrusive_ptr; diff --git a/src/mongo/db/pipeline/change_stream_expired_pre_image_remover.cpp b/src/mongo/db/pipeline/change_stream_expired_pre_image_remover.cpp index 0beb1108ef3..37eaa0d26d3 100644 --- a/src/mongo/db/pipeline/change_stream_expired_pre_image_remover.cpp +++ b/src/mongo/db/pipeline/change_stream_expired_pre_image_remover.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -52,6 +51,9 @@ #include "mongo/util/concurrency/idle_thread_block.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { // Fail point to set current time for time-based expiration of pre-images. MONGO_FAIL_POINT_DEFINE(changeStreamPreImageRemoverCurrentTime); diff --git a/src/mongo/db/pipeline/change_stream_helpers_legacy.cpp b/src/mongo/db/pipeline/change_stream_helpers_legacy.cpp index b09dae13b0c..bf935d51da4 100644 --- a/src/mongo/db/pipeline/change_stream_helpers_legacy.cpp +++ b/src/mongo/db/pipeline/change_stream_helpers_legacy.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/db/pipeline/change_stream_helpers_legacy.h" @@ -44,6 +43,9 @@ #include "mongo/db/pipeline/document_source_change_stream_unwind_transaction.h" #include "mongo/db/pipeline/expression.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace change_stream_legacy { diff --git a/src/mongo/db/pipeline/change_stream_pre_image_helpers.cpp b/src/mongo/db/pipeline/change_stream_pre_image_helpers.cpp index 3bdbf3954c5..f153a30818f 100644 --- a/src/mongo/db/pipeline/change_stream_pre_image_helpers.cpp +++ b/src/mongo/db/pipeline/change_stream_pre_image_helpers.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/db/namespace_string.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { void writeToChangeStreamPreImagesCollection(OperationContext* opCtx, const ChangeStreamPreImage& preImage) { diff --git a/src/mongo/db/pipeline/document_source.cpp b/src/mongo/db/pipeline/document_source.cpp index 3a5d5d0030c..c9358ebdc73 100644 --- a/src/mongo/db/pipeline/document_source.cpp +++ b/src/mongo/db/pipeline/document_source.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/string_map.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using Parser = DocumentSource::Parser; diff --git a/src/mongo/db/pipeline/document_source_change_stream.cpp b/src/mongo/db/pipeline/document_source_change_stream.cpp index bb4ee0c9b2c..b1056d4db2e 100644 --- a/src/mongo/db/pipeline/document_source_change_stream.cpp +++ b/src/mongo/db/pipeline/document_source_change_stream.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/db/pipeline/document_source_change_stream.h" @@ -60,6 +59,9 @@ #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/vector_clock.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { using boost::intrusive_ptr; diff --git a/src/mongo/db/pipeline/document_source_change_stream_add_pre_image.cpp b/src/mongo/db/pipeline/document_source_change_stream_add_pre_image.cpp index 97b252c9829..6b37f50f723 100644 --- a/src/mongo/db/pipeline/document_source_change_stream_add_pre_image.cpp +++ b/src/mongo/db/pipeline/document_source_change_stream_add_pre_image.cpp @@ -28,7 +28,6 @@ */ #include "mongo/util/assert_util.h" -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/db/transaction_history_iterator.h" #include "mongo/util/intrusive_counter.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/pipeline/document_source_change_stream_check_invalidate.cpp b/src/mongo/db/pipeline/document_source_change_stream_check_invalidate.cpp index 8121fedb3e7..4fe0b17094b 100644 --- a/src/mongo/db/pipeline/document_source_change_stream_check_invalidate.cpp +++ b/src/mongo/db/pipeline/document_source_change_stream_check_invalidate.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/db/query/query_feature_flags_gen.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { using DSCS = DocumentSourceChangeStream; diff --git a/src/mongo/db/pipeline/document_source_change_stream_transform.cpp b/src/mongo/db/pipeline/document_source_change_stream_transform.cpp index 766150a6e54..1a8e1b5643a 100644 --- a/src/mongo/db/pipeline/document_source_change_stream_transform.cpp +++ b/src/mongo/db/pipeline/document_source_change_stream_transform.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/db/repl/bson_extract_optime.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { using boost::intrusive_ptr; diff --git a/src/mongo/db/pipeline/document_source_change_stream_unwind_transaction.cpp b/src/mongo/db/pipeline/document_source_change_stream_unwind_transaction.cpp index 443769f234c..fca0938c347 100644 --- a/src/mongo/db/pipeline/document_source_change_stream_unwind_transaction.cpp +++ b/src/mongo/db/pipeline/document_source_change_stream_unwind_transaction.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/db/query/query_feature_flags_gen.h" #include "mongo/db/transaction_history_iterator.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { REGISTER_INTERNAL_DOCUMENT_SOURCE(_internalChangeStreamUnwindTransaction, diff --git a/src/mongo/db/pipeline/document_source_cursor.cpp b/src/mongo/db/pipeline/document_source_cursor.cpp index 55bacba9d7f..b98af917d99 100644 --- a/src/mongo/db/pipeline/document_source_cursor.cpp +++ b/src/mongo/db/pipeline/document_source_cursor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { MONGO_FAIL_POINT_DEFINE(hangBeforeDocumentSourceCursorLoadBatch); diff --git a/src/mongo/db/pipeline/document_source_exchange.cpp b/src/mongo/db/pipeline/document_source_exchange.cpp index 931b78f316e..fa684862198 100644 --- a/src/mongo/db/pipeline/document_source_exchange.cpp +++ b/src/mongo/db/pipeline/document_source_exchange.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/db/storage/key_string.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { MONGO_FAIL_POINT_DEFINE(exchangeFailLoadNextBatch); diff --git a/src/mongo/db/pipeline/document_source_exchange_test.cpp b/src/mongo/db/pipeline/document_source_exchange_test.cpp index ac234357b17..fe9a50f45f7 100644 --- a/src/mongo/db/pipeline/document_source_exchange_test.cpp +++ b/src/mongo/db/pipeline/document_source_exchange_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -47,6 +46,8 @@ #include "mongo/util/system_clock_source.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + namespace mongo { diff --git a/src/mongo/db/pipeline/document_source_find_and_modify_image_lookup.cpp b/src/mongo/db/pipeline/document_source_find_and_modify_image_lookup.cpp index 4a143c16a7e..e66c1484519 100644 --- a/src/mongo/db/pipeline/document_source_find_and_modify_image_lookup.cpp +++ b/src/mongo/db/pipeline/document_source_find_and_modify_image_lookup.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/db/repl/image_collection_entry_gen.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/pipeline/document_source_find_and_modify_image_lookup_test.cpp b/src/mongo/db/pipeline/document_source_find_and_modify_image_lookup_test.cpp index 47025864fe7..a80b87586ad 100644 --- a/src/mongo/db/pipeline/document_source_find_and_modify_image_lookup_test.cpp +++ b/src/mongo/db/pipeline/document_source_find_and_modify_image_lookup_test.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/pipeline/document_source_geo_near.cpp b/src/mongo/db/pipeline/document_source_geo_near.cpp index 1ee840df794..3a322a5d6bd 100644 --- a/src/mongo/db/pipeline/document_source_geo_near.cpp +++ b/src/mongo/db/pipeline/document_source_geo_near.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/db/pipeline/pipeline.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using boost::intrusive_ptr; diff --git a/src/mongo/db/pipeline/document_source_graph_lookup.cpp b/src/mongo/db/pipeline/document_source_graph_lookup.cpp index 8634d4d86bd..adf391fadea 100644 --- a/src/mongo/db/pipeline/document_source_graph_lookup.cpp +++ b/src/mongo/db/pipeline/document_source_graph_lookup.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/db/views/resolved_view.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { diff --git a/src/mongo/db/pipeline/document_source_internal_apply_oplog_update.cpp b/src/mongo/db/pipeline/document_source_internal_apply_oplog_update.cpp index 51b0dee8ac1..4926253cc2e 100644 --- a/src/mongo/db/pipeline/document_source_internal_apply_oplog_update.cpp +++ b/src/mongo/db/pipeline/document_source_internal_apply_oplog_update.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/db/pipeline/lite_parsed_document_source.h" #include "mongo/db/update/update_driver.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { REGISTER_DOCUMENT_SOURCE(_internalApplyOplogUpdate, diff --git a/src/mongo/db/pipeline/document_source_internal_compute_geo_near_distance.cpp b/src/mongo/db/pipeline/document_source_internal_compute_geo_near_distance.cpp index f643bcb32f3..87845a67826 100644 --- a/src/mongo/db/pipeline/document_source_internal_compute_geo_near_distance.cpp +++ b/src/mongo/db/pipeline/document_source_internal_compute_geo_near_distance.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/db/geo/geoparser.h" #include "mongo/db/pipeline/document_source_internal_compute_geo_near_distance.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { REGISTER_DOCUMENT_SOURCE(_internalComputeGeoNearDistance, diff --git a/src/mongo/db/pipeline/document_source_internal_shard_filter.cpp b/src/mongo/db/pipeline/document_source_internal_shard_filter.cpp index a8b112ae834..a2aa30596d5 100644 --- a/src/mongo/db/pipeline/document_source_internal_shard_filter.cpp +++ b/src/mongo/db/pipeline/document_source_internal_shard_filter.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/db/exec/document_value/document.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { // diff --git a/src/mongo/db/pipeline/document_source_internal_unpack_bucket.cpp b/src/mongo/db/pipeline/document_source_internal_unpack_bucket.cpp index 272d7a1a80c..ac865189506 100644 --- a/src/mongo/db/pipeline/document_source_internal_unpack_bucket.cpp +++ b/src/mongo/db/pipeline/document_source_internal_unpack_bucket.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include <algorithm> #include <iterator> @@ -65,6 +64,9 @@ #include "mongo/util/duration.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { /* diff --git a/src/mongo/db/pipeline/document_source_lookup.cpp b/src/mongo/db/pipeline/document_source_lookup.cpp index f6f53594e7e..a9e5968249d 100644 --- a/src/mongo/db/pipeline/document_source_lookup.cpp +++ b/src/mongo/db/pipeline/document_source_lookup.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/db/pipeline/document_source_lookup.h" @@ -50,6 +49,9 @@ #include "mongo/platform/overflow_arithmetic.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { diff --git a/src/mongo/db/pipeline/document_source_match_test.cpp b/src/mongo/db/pipeline/document_source_match_test.cpp index f5b53a393e8..5d3ac170cae 100644 --- a/src/mongo/db/pipeline/document_source_match_test.cpp +++ b/src/mongo/db/pipeline/document_source_match_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/unittest/death_test.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { using std::string; diff --git a/src/mongo/db/pipeline/document_source_merge.cpp b/src/mongo/db/pipeline/document_source_merge.cpp index 96a1dd55547..a9ae914c2c0 100644 --- a/src/mongo/db/pipeline/document_source_merge.cpp +++ b/src/mongo/db/pipeline/document_source_merge.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/db/storage/duplicate_key_error_info.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using namespace fmt::literals; diff --git a/src/mongo/db/pipeline/document_source_out.cpp b/src/mongo/db/pipeline/document_source_out.cpp index 9be7c7a24ba..43e55d5da91 100644 --- a/src/mongo/db/pipeline/document_source_out.cpp +++ b/src/mongo/db/pipeline/document_source_out.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/uuid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using namespace fmt::literals; diff --git a/src/mongo/db/pipeline/document_source_sample_from_random_cursor.cpp b/src/mongo/db/pipeline/document_source_sample_from_random_cursor.cpp index 1105966e3ac..885cbed6132 100644 --- a/src/mongo/db/pipeline/document_source_sample_from_random_cursor.cpp +++ b/src/mongo/db/pipeline/document_source_sample_from_random_cursor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/db/pipeline/expression_context.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using boost::intrusive_ptr; diff --git a/src/mongo/db/pipeline/document_source_set_variable_from_subpipeline.cpp b/src/mongo/db/pipeline/document_source_set_variable_from_subpipeline.cpp index f87810b1f06..c26fbaec438 100644 --- a/src/mongo/db/pipeline/document_source_set_variable_from_subpipeline.cpp +++ b/src/mongo/db/pipeline/document_source_set_variable_from_subpipeline.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/db/pipeline/document_source_set_variable_from_subpipeline.h" #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/db/views/resolved_view.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using boost::intrusive_ptr; diff --git a/src/mongo/db/pipeline/document_source_sort.cpp b/src/mongo/db/pipeline/document_source_sort.cpp index 2503a2e0857..017fd985485 100644 --- a/src/mongo/db/pipeline/document_source_sort.cpp +++ b/src/mongo/db/pipeline/document_source_sort.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -663,6 +662,9 @@ std::string nextFileName() { } // namespace mongo #include "mongo/db/sorter/sorter.cpp" + +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + template class ::mongo::BoundedSorter<::mongo::DocumentSourceSort::SortableDate, ::mongo::Document, ::mongo::CompAsc, diff --git a/src/mongo/db/pipeline/document_source_union_with.cpp b/src/mongo/db/pipeline/document_source_union_with.cpp index 6e69746dd98..52824574a4d 100644 --- a/src/mongo/db/pipeline/document_source_union_with.cpp +++ b/src/mongo/db/pipeline/document_source_union_with.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/db/views/resolved_view.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { REGISTER_DOCUMENT_SOURCE(unionWith, diff --git a/src/mongo/db/pipeline/expression_test.cpp b/src/mongo/db/pipeline/expression_test.cpp index 63eb5cc884c..b33f3bc893c 100644 --- a/src/mongo/db/pipeline/expression_test.cpp +++ b/src/mongo/db/pipeline/expression_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace ExpressionTests { using boost::intrusive_ptr; diff --git a/src/mongo/db/pipeline/pipeline.cpp b/src/mongo/db/pipeline/pipeline.cpp index b85a1e379ee..c1339084e96 100644 --- a/src/mongo/db/pipeline/pipeline.cpp +++ b/src/mongo/db/pipeline/pipeline.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/db/pipeline/pipeline.h" #include "mongo/logv2/log.h" @@ -52,6 +51,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/db/pipeline/pipeline_d.cpp b/src/mongo/db/pipeline/pipeline_d.cpp index 460b9c75095..7379cacf274 100644 --- a/src/mongo/db/pipeline/pipeline_d.cpp +++ b/src/mongo/db/pipeline/pipeline_d.cpp @@ -28,8 +28,6 @@ */ #include "mongo/db/query/projection_parser.h" -#include "mongo/db/server_options.h" -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -95,6 +93,9 @@ #include "mongo/s/query/document_source_merge_cursors.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using boost::intrusive_ptr; diff --git a/src/mongo/db/pipeline/process_interface/common_mongod_process_interface.cpp b/src/mongo/db/pipeline/process_interface/common_mongod_process_interface.cpp index 1fcc00c5374..2639d0c1050 100644 --- a/src/mongo/db/pipeline/process_interface/common_mongod_process_interface.cpp +++ b/src/mongo/db/pipeline/process_interface/common_mongod_process_interface.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/db/pipeline/process_interface/common_mongod_process_interface.h" @@ -74,6 +73,9 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/query/document_source_merge_cursors.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { diff --git a/src/mongo/db/pipeline/process_interface/common_process_interface.cpp b/src/mongo/db/pipeline/process_interface/common_process_interface.cpp index 7cb66e7f61a..57e4c15f3cc 100644 --- a/src/mongo/db/pipeline/process_interface/common_process_interface.cpp +++ b/src/mongo/db/pipeline/process_interface/common_process_interface.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include "mongo/util/diagnostic_info.h" #endif +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { std::vector<BSONObj> CommonProcessInterface::getCurrentOps( diff --git a/src/mongo/db/pipeline/process_interface/mongos_process_interface.cpp b/src/mongo/db/pipeline/process_interface/mongos_process_interface.cpp index 6f17c7a0121..c3dcee83248 100644 --- a/src/mongo/db/pipeline/process_interface/mongos_process_interface.cpp +++ b/src/mongo/db/pipeline/process_interface/mongos_process_interface.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -56,6 +55,9 @@ #include "mongo/s/transaction_router.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { diff --git a/src/mongo/db/pipeline/process_interface/shardsvr_process_interface.cpp b/src/mongo/db/pipeline/process_interface/shardsvr_process_interface.cpp index 69b5a111e2b..be36893b9d5 100644 --- a/src/mongo/db/pipeline/process_interface/shardsvr_process_interface.cpp +++ b/src/mongo/db/pipeline/process_interface/shardsvr_process_interface.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include "mongo/s/router.h" #include "mongo/s/stale_shard_version_helpers.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using namespace fmt::literals; diff --git a/src/mongo/db/pipeline/resharding_initial_split_policy_test.cpp b/src/mongo/db/pipeline/resharding_initial_split_policy_test.cpp index a008cc92115..bc17e9d0133 100644 --- a/src/mongo/db/pipeline/resharding_initial_split_policy_test.cpp +++ b/src/mongo/db/pipeline/resharding_initial_split_policy_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/s/query/sharded_agg_test_fixture.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/pipeline/resume_token_test.cpp b/src/mongo/db/pipeline/resume_token_test.cpp index cbdd6b8b0eb..8592e701665 100644 --- a/src/mongo/db/pipeline/resume_token_test.cpp +++ b/src/mongo/db/pipeline/resume_token_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/db/pipeline/resume_token.h" @@ -40,6 +39,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/hex.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/pipeline/sharded_agg_helpers.cpp b/src/mongo/db/pipeline/sharded_agg_helpers.cpp index b49422c9959..7822f742fe0 100644 --- a/src/mongo/db/pipeline/sharded_agg_helpers.cpp +++ b/src/mongo/db/pipeline/sharded_agg_helpers.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/db/pipeline/sharded_agg_helpers.h" @@ -66,6 +65,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/visit_helper.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace sharded_agg_helpers { namespace { diff --git a/src/mongo/db/process_health/config_server_health_observer.cpp b/src/mongo/db/process_health/config_server_health_observer.cpp index 1ffb7989b70..290387d4de5 100644 --- a/src/mongo/db/process_health/config_server_health_observer.cpp +++ b/src/mongo/db/process_health/config_server_health_observer.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kProcessHealth #include <random> @@ -40,6 +39,9 @@ #include "mongo/s/grid.h" #include "mongo/util/future_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kProcessHealth + + namespace mongo { namespace process_health { diff --git a/src/mongo/db/process_health/dns_health_observer.cpp b/src/mongo/db/process_health/dns_health_observer.cpp index ef414513aff..6f41e5e2785 100644 --- a/src/mongo/db/process_health/dns_health_observer.cpp +++ b/src/mongo/db/process_health/dns_health_observer.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kProcessHealth #include "mongo/db/process_health/dns_health_observer.h" @@ -39,6 +38,9 @@ #include <algorithm> #include <random> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kProcessHealth + + namespace mongo { namespace process_health { diff --git a/src/mongo/db/process_health/fault_manager.cpp b/src/mongo/db/process_health/fault_manager.cpp index 6518316b139..20540717347 100644 --- a/src/mongo/db/process_health/fault_manager.cpp +++ b/src/mongo/db/process_health/fault_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kProcessHealth #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/util/concurrency/thread_pool.h" #include "mongo/util/exit_code.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kProcessHealth + + namespace mongo { namespace process_health { diff --git a/src/mongo/db/process_health/fault_manager_config.cpp b/src/mongo/db/process_health/fault_manager_config.cpp index b5e3cc57d46..3f097ceac5c 100644 --- a/src/mongo/db/process_health/fault_manager_config.cpp +++ b/src/mongo/db/process_health/fault_manager_config.cpp @@ -27,12 +27,14 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kProcessHealth #include "mongo/platform/basic.h" #include "mongo/db/process_health/fault_manager_config.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kProcessHealth + + namespace mongo { namespace process_health { diff --git a/src/mongo/db/process_health/health_observer_base.cpp b/src/mongo/db/process_health/health_observer_base.cpp index fe3509835df..243a9cf7937 100644 --- a/src/mongo/db/process_health/health_observer_base.cpp +++ b/src/mongo/db/process_health/health_observer_base.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kProcessHealth #include "mongo/db/process_health/health_observer_base.h" @@ -35,6 +34,9 @@ #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kProcessHealth + + namespace mongo { namespace process_health { diff --git a/src/mongo/db/process_health/health_observer_test.cpp b/src/mongo/db/process_health/health_observer_test.cpp index 7cbbd52c154..66f5c8a6e99 100644 --- a/src/mongo/db/process_health/health_observer_test.cpp +++ b/src/mongo/db/process_health/health_observer_test.cpp @@ -39,6 +39,7 @@ #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + namespace mongo { namespace process_health { diff --git a/src/mongo/db/process_health/progress_monitor.cpp b/src/mongo/db/process_health/progress_monitor.cpp index c8552ef8f3e..d940a06c498 100644 --- a/src/mongo/db/process_health/progress_monitor.cpp +++ b/src/mongo/db/process_health/progress_monitor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kProcessHealth #include "mongo/db/process_health/progress_monitor.h" @@ -36,6 +35,9 @@ #include "mongo/db/process_health/health_observer.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kProcessHealth + + namespace mongo { namespace process_health { diff --git a/src/mongo/db/process_health/test_health_observer.cpp b/src/mongo/db/process_health/test_health_observer.cpp index ece51a11165..70572c48851 100644 --- a/src/mongo/db/process_health/test_health_observer.cpp +++ b/src/mongo/db/process_health/test_health_observer.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kProcessHealth #include "mongo/db/process_health/test_health_observer.h" @@ -34,6 +33,9 @@ #include "mongo/db/process_health/health_observer_registration.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kProcessHealth + + namespace mongo { namespace process_health { MONGO_FAIL_POINT_DEFINE(hangTestHealthObserver); diff --git a/src/mongo/db/profile_filter_impl.cpp b/src/mongo/db/profile_filter_impl.cpp index 7209780714e..62d9de9daf5 100644 --- a/src/mongo/db/profile_filter_impl.cpp +++ b/src/mongo/db/profile_filter_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/logv2/log.h" #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/db/pipeline/expression_context.h" #include "mongo/db/profile_filter_impl.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { diff --git a/src/mongo/db/query/canonical_query.cpp b/src/mongo/db/query/canonical_query.cpp index 865cd10b245..2271f4ce494 100644 --- a/src/mongo/db/query/canonical_query.cpp +++ b/src/mongo/db/query/canonical_query.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/db/query/projection_parser.h" #include "mongo/db/query/query_planner_common.h" #include "mongo/logv2/log.h" + +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + namespace mongo { namespace { diff --git a/src/mongo/db/query/canonical_query_encoder.cpp b/src/mongo/db/query/canonical_query_encoder.cpp index 494894ec097..a6a94915e91 100644 --- a/src/mongo/db/query/canonical_query_encoder.cpp +++ b/src/mongo/db/query/canonical_query_encoder.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/db/query/canonical_query_encoder.h" @@ -49,6 +48,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/base64.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { bool isQueryNegatingEqualToNull(const mongo::MatchExpression* tree) { diff --git a/src/mongo/db/query/classic_stage_builder.cpp b/src/mongo/db/query/classic_stage_builder.cpp index 19aee75c1ca..94b0bb7df14 100644 --- a/src/mongo/db/query/classic_stage_builder.cpp +++ b/src/mongo/db/query/classic_stage_builder.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -65,6 +64,9 @@ #include "mongo/db/s/collection_sharding_state.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo::stage_builder { // Returns a non-null pointer to the root of a plan tree, or a non-OK status if the PlanStage tree // could not be constructed. diff --git a/src/mongo/db/query/collection_index_usage_tracker_decoration.cpp b/src/mongo/db/query/collection_index_usage_tracker_decoration.cpp index 59ae9bd1c1d..8f4216874b3 100644 --- a/src/mongo/db/query/collection_index_usage_tracker_decoration.cpp +++ b/src/mongo/db/query/collection_index_usage_tracker_decoration.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/db/catalog/collection.h" #include "mongo/db/service_context.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { diff --git a/src/mongo/db/query/collection_query_info.cpp b/src/mongo/db/query/collection_query_info.cpp index e624389b642..f0efe85fd86 100644 --- a/src/mongo/db/query/collection_query_info.cpp +++ b/src/mongo/db/query/collection_query_info.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -53,6 +52,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/clock_source.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/query/cursor_response.cpp b/src/mongo/db/query/cursor_response.cpp index 81bbe7ed1b9..e6ea4ae6ea3 100644 --- a/src/mongo/db/query/cursor_response.cpp +++ b/src/mongo/db/query/cursor_response.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/bson/bsontypes.h" #include "mongo/rpc/get_status_from_command_result.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { diff --git a/src/mongo/db/query/datetime/date_time_support.cpp b/src/mongo/db/query/datetime/date_time_support.cpp index 1fe0ecd81d0..09badabd4a0 100644 --- a/src/mongo/db/query/datetime/date_time_support.cpp +++ b/src/mongo/db/query/datetime/date_time_support.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/util/duration.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/db/query/expression_index.cpp b/src/mongo/db/query/expression_index.cpp index 7820ffbb1ad..5ca2dfce2d1 100644 --- a/src/mongo/db/query/expression_index.cpp +++ b/src/mongo/db/query/expression_index.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/db/query/expression_index.h" @@ -44,6 +43,9 @@ #include "third_party/s2/s2region.h" #include "third_party/s2/s2regioncoverer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using std::set; diff --git a/src/mongo/db/query/find.cpp b/src/mongo/db/query/find.cpp index d2f36155e13..b48bb92e5bd 100644 --- a/src/mongo/db/query/find.cpp +++ b/src/mongo/db/query/find.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -70,6 +69,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using std::unique_ptr; diff --git a/src/mongo/db/query/find_common.cpp b/src/mongo/db/query/find_common.cpp index 57f9f3954b2..74a824ab69a 100644 --- a/src/mongo/db/query/find_common.cpp +++ b/src/mongo/db/query/find_common.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { MONGO_FAIL_POINT_DEFINE(waitInFindBeforeMakingBatch); diff --git a/src/mongo/db/query/get_executor.cpp b/src/mongo/db/query/get_executor.cpp index aa5ac8cc6b6..b51e3ebaf14 100644 --- a/src/mongo/db/query/get_executor.cpp +++ b/src/mongo/db/query/get_executor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -107,6 +106,9 @@ #include "mongo/scripting/engine.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { MONGO_FAIL_POINT_DEFINE(includeFakeColumnarIndex); diff --git a/src/mongo/db/query/index_bounds_builder.cpp b/src/mongo/db/query/index_bounds_builder.cpp index 01e13b5f058..17d3097e1c1 100644 --- a/src/mongo/db/query/index_bounds_builder.cpp +++ b/src/mongo/db/query/index_bounds_builder.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/db/query/index_bounds_builder.h" @@ -56,6 +55,9 @@ #include "third_party/s2/s2cell.h" #include "third_party/s2/s2regioncoverer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { diff --git a/src/mongo/db/query/plan_cache_callbacks.cpp b/src/mongo/db/query/plan_cache_callbacks.cpp index 59f960a4749..e467938b123 100644 --- a/src/mongo/db/query/plan_cache_callbacks.cpp +++ b/src/mongo/db/query/plan_cache_callbacks.cpp @@ -27,12 +27,14 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/db/query/plan_cache_callbacks.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo::log_detail { void logInactiveCacheEntry(const std::string& key) { LOGV2_DEBUG( diff --git a/src/mongo/db/query/plan_cache_invalidator.cpp b/src/mongo/db/query/plan_cache_invalidator.cpp index e315ea7f78c..7d59b15ddbb 100644 --- a/src/mongo/db/query/plan_cache_invalidator.cpp +++ b/src/mongo/db/query/plan_cache_invalidator.cpp @@ -27,13 +27,15 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/db/query/plan_cache_invalidator.h" #include "mongo/db/query/sbe_plan_cache.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { diff --git a/src/mongo/db/query/plan_cache_test.cpp b/src/mongo/db/query/plan_cache_test.cpp index b22d5cde232..b99f522a710 100644 --- a/src/mongo/db/query/plan_cache_test.cpp +++ b/src/mongo/db/query/plan_cache_test.cpp @@ -31,7 +31,6 @@ * This file contains tests for mongo/db/query/plan_cache.h */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/db/query/plan_cache.h" @@ -62,6 +61,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/transitional_tools_do_not_use/vector_spooling.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + using namespace mongo; using unittest::assertGet; diff --git a/src/mongo/db/query/plan_enumerator.cpp b/src/mongo/db/query/plan_enumerator.cpp index a11bc9b415a..a822ad81c6f 100644 --- a/src/mongo/db/query/plan_enumerator.cpp +++ b/src/mongo/db/query/plan_enumerator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/db/query/plan_enumerator.h" @@ -38,6 +37,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/string_map.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace { using namespace mongo; diff --git a/src/mongo/db/query/plan_executor_factory.cpp b/src/mongo/db/query/plan_executor_factory.cpp index 0b66c3dafce..2403ff7c353 100644 --- a/src/mongo/db/query/plan_executor_factory.cpp +++ b/src/mongo/db/query/plan_executor_factory.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/db/query/util/make_data_structure.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo::plan_executor_factory { StatusWith<std::unique_ptr<PlanExecutor, PlanExecutor::Deleter>> make( diff --git a/src/mongo/db/query/plan_executor_impl.cpp b/src/mongo/db/query/plan_executor_impl.cpp index c3ae2946a38..e7cd12ec7b2 100644 --- a/src/mongo/db/query/plan_executor_impl.cpp +++ b/src/mongo/db/query/plan_executor_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -68,6 +67,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/stacktrace.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using std::shared_ptr; diff --git a/src/mongo/db/query/plan_executor_sbe.cpp b/src/mongo/db/query/plan_executor_sbe.cpp index c8d516cb718..70e2e15c8d7 100644 --- a/src/mongo/db/query/plan_executor_sbe.cpp +++ b/src/mongo/db/query/plan_executor_sbe.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/resharding/resume_token_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { // This failpoint is defined by the classic executor but is also accessed here. extern FailPoint planExecutorHangBeforeShouldWaitForInserts; diff --git a/src/mongo/db/query/plan_explainer_impl.cpp b/src/mongo/db/query/plan_explainer_impl.cpp index ca0bd6162a7..d5d4d2b8aa0 100644 --- a/src/mongo/db/query/plan_explainer_impl.cpp +++ b/src/mongo/db/query/plan_explainer_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -53,6 +52,9 @@ #include "mongo/db/record_id_helpers.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { /** diff --git a/src/mongo/db/query/plan_insert_listener.cpp b/src/mongo/db/query/plan_insert_listener.cpp index 0d86c76c9e7..2a1653bb45c 100644 --- a/src/mongo/db/query/plan_insert_listener.cpp +++ b/src/mongo/db/query/plan_insert_listener.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo::insert_listener { namespace { MONGO_FAIL_POINT_DEFINE(planExecutorHangWhileYieldedInWaitForInserts); diff --git a/src/mongo/db/query/plan_ranker.cpp b/src/mongo/db/query/plan_ranker.cpp index 87f189e89f7..6c9ec63863f 100644 --- a/src/mongo/db/query/plan_ranker.cpp +++ b/src/mongo/db/query/plan_ranker.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo::plan_ranker { namespace log_detail { void logScoreFormula(std::function<std::string()> formula, diff --git a/src/mongo/db/query/planner_access.cpp b/src/mongo/db/query/planner_access.cpp index 506493a3437..13e731c950e 100644 --- a/src/mongo/db/query/planner_access.cpp +++ b/src/mongo/db/query/planner_access.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -57,6 +56,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/transitional_tools_do_not_use/vector_spooling.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace { using namespace mongo; diff --git a/src/mongo/db/query/planner_analysis.cpp b/src/mongo/db/query/planner_analysis.cpp index 039f07b9219..04f1e30104c 100644 --- a/src/mongo/db/query/planner_analysis.cpp +++ b/src/mongo/db/query/planner_analysis.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/db/query/planner_analysis.h" @@ -45,6 +44,9 @@ #include "mongo/db/query/query_planner_common.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using std::endl; diff --git a/src/mongo/db/query/planner_ixselect.cpp b/src/mongo/db/query/planner_ixselect.cpp index 518da370750..4ea80a9e64f 100644 --- a/src/mongo/db/query/planner_ixselect.cpp +++ b/src/mongo/db/query/planner_ixselect.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/db/query/planner_ixselect.h" @@ -51,6 +50,9 @@ #include "mongo/db/query/query_planner_common.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { diff --git a/src/mongo/db/query/planner_wildcard_helpers.cpp b/src/mongo/db/query/planner_wildcard_helpers.cpp index 954882006bc..fbf8c3c8f50 100644 --- a/src/mongo/db/query/planner_wildcard_helpers.cpp +++ b/src/mongo/db/query/planner_wildcard_helpers.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/db/query/index_bounds.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace wildcard_planning { namespace { diff --git a/src/mongo/db/query/query_planner.cpp b/src/mongo/db/query/query_planner.cpp index 4606cd16510..019623216cd 100644 --- a/src/mongo/db/query/query_planner.cpp +++ b/src/mongo/db/query/query_planner.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -63,6 +62,9 @@ #include "mongo/db/query/query_solution.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace log_detail { void logSubplannerIndexEntry(const IndexEntry& entry, size_t childIndex) { diff --git a/src/mongo/db/query/query_planner_common.cpp b/src/mongo/db/query/query_planner_common.cpp index f5b23b68dad..013c2b88378 100644 --- a/src/mongo/db/query/query_planner_common.cpp +++ b/src/mongo/db/query/query_planner_common.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/logv2/redaction.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { void QueryPlannerCommon::reverseScans(QuerySolutionNode* node) { diff --git a/src/mongo/db/query/query_planner_test_fixture.cpp b/src/mongo/db/query/query_planner_test_fixture.cpp index 669bef27106..6db2512950e 100644 --- a/src/mongo/db/query/query_planner_test_fixture.cpp +++ b/src/mongo/db/query/query_planner_test_fixture.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/transitional_tools_do_not_use/vector_spooling.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { using unittest::assertGet; diff --git a/src/mongo/db/query/query_planner_test_lib.cpp b/src/mongo/db/query/query_planner_test_lib.cpp index 87d34b9b196..5eeb44f7ff2 100644 --- a/src/mongo/db/query/query_planner_test_lib.cpp +++ b/src/mongo/db/query/query_planner_test_lib.cpp @@ -31,7 +31,6 @@ * This file contains tests for mongo/db/query/query_planner.cpp */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/db/query/query_planner_test_lib.h" @@ -53,6 +52,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace { using namespace mongo; diff --git a/src/mongo/db/query/query_settings_decoration.cpp b/src/mongo/db/query/query_settings_decoration.cpp index 12fca04fbd2..1015bbfe09b 100644 --- a/src/mongo/db/query/query_settings_decoration.cpp +++ b/src/mongo/db/query/query_settings_decoration.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/db/catalog/collection.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { diff --git a/src/mongo/db/query/sbe_cached_solution_planner.cpp b/src/mongo/db/query/sbe_cached_solution_planner.cpp index 8aa5c2105a0..6c243294011 100644 --- a/src/mongo/db/query/sbe_cached_solution_planner.cpp +++ b/src/mongo/db/query/sbe_cached_solution_planner.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/db/query/util/make_data_structure.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo::sbe { CandidatePlans CachedSolutionPlanner::plan( std::vector<std::unique_ptr<QuerySolution>> solutions, diff --git a/src/mongo/db/query/sbe_multi_planner.cpp b/src/mongo/db/query/sbe_multi_planner.cpp index 1f1429ffb1f..b9966e74683 100644 --- a/src/mongo/db/query/sbe_multi_planner.cpp +++ b/src/mongo/db/query/sbe_multi_planner.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/db/query/stage_builder_util.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo::sbe { CandidatePlans MultiPlanner::plan( std::vector<std::unique_ptr<QuerySolution>> solutions, diff --git a/src/mongo/db/query/sbe_plan_cache.cpp b/src/mongo/db/query/sbe_plan_cache.cpp index b699387cc47..0d7a90e9ed5 100644 --- a/src/mongo/db/query/sbe_plan_cache.cpp +++ b/src/mongo/db/query/sbe_plan_cache.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/db/query/sbe_plan_cache.h" @@ -36,6 +35,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/processinfo.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo::sbe { namespace { diff --git a/src/mongo/db/query/sbe_stage_builder.cpp b/src/mongo/db/query/sbe_stage_builder.cpp index 919a7ce6dc8..f14ebdfb29d 100644 --- a/src/mongo/db/query/sbe_stage_builder.cpp +++ b/src/mongo/db/query/sbe_stage_builder.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -80,6 +79,9 @@ #include "mongo/db/storage/execution_context.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo::stage_builder { namespace { /** diff --git a/src/mongo/db/query/sbe_stage_builder_coll_scan.cpp b/src/mongo/db/query/sbe_stage_builder_coll_scan.cpp index 18f4857bbaf..f3011ec2bac 100644 --- a/src/mongo/db/query/sbe_stage_builder_coll_scan.cpp +++ b/src/mongo/db/query/sbe_stage_builder_coll_scan.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo::stage_builder { namespace { diff --git a/src/mongo/db/query/sbe_stage_builder_helpers.cpp b/src/mongo/db/query/sbe_stage_builder_helpers.cpp index 8db43a8dd92..e881a9ab4eb 100644 --- a/src/mongo/db/query/sbe_stage_builder_helpers.cpp +++ b/src/mongo/db/query/sbe_stage_builder_helpers.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include "mongo/db/storage/execution_context.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo::stage_builder { std::unique_ptr<sbe::EExpression> makeUnaryOp(sbe::EPrimUnary::Op unaryOp, diff --git a/src/mongo/db/query/sbe_stage_builder_index_scan.cpp b/src/mongo/db/query/sbe_stage_builder_index_scan.cpp index 5a8d9b72de8..acb395b857d 100644 --- a/src/mongo/db/query/sbe_stage_builder_index_scan.cpp +++ b/src/mongo/db/query/sbe_stage_builder_index_scan.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -58,6 +57,9 @@ #include "mongo/util/visit_helper.h" #include <boost/optional.hpp> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo::stage_builder { namespace { /** diff --git a/src/mongo/db/query/sbe_stage_builder_lookup.cpp b/src/mongo/db/query/sbe_stage_builder_lookup.cpp index 665b0249925..b1077b0ae79 100644 --- a/src/mongo/db/query/sbe_stage_builder_lookup.cpp +++ b/src/mongo/db/query/sbe_stage_builder_lookup.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -57,6 +56,9 @@ #include "mongo/db/query/sbe_stage_builder_filter.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo::stage_builder { /** * Helpers for building $lookup. diff --git a/src/mongo/db/query/sbe_utils.cpp b/src/mongo/db/query/sbe_utils.cpp index 19bf5c77bbe..043027f1e89 100644 --- a/src/mongo/db/query/sbe_utils.cpp +++ b/src/mongo/db/query/sbe_utils.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/db/query/sbe_utils.h" @@ -38,6 +37,9 @@ #include "mongo/db/query/sbe_stage_builder.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo::sbe { namespace { /** diff --git a/src/mongo/db/read_concern_mongod.cpp b/src/mongo/db/read_concern_mongod.cpp index 0efa9a8faf9..fca51eacb0e 100644 --- a/src/mongo/db/read_concern_mongod.cpp +++ b/src/mongo/db/read_concern_mongod.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/base/shim.h" #include "mongo/base/status.h" @@ -52,6 +51,9 @@ #include "mongo/s/grid.h" #include "mongo/util/concurrency/notification.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/read_concern_test.cpp b/src/mongo/db/read_concern_test.cpp index e1742a6ca54..85a9f92dce2 100644 --- a/src/mongo/db/read_concern_test.cpp +++ b/src/mongo/db/read_concern_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace repl { namespace { diff --git a/src/mongo/db/read_write_concern_defaults.cpp b/src/mongo/db/read_write_concern_defaults.cpp index 68dd5fb9477..ea912a73581 100644 --- a/src/mongo/db/read_write_concern_defaults.cpp +++ b/src/mongo/db/read_write_concern_defaults.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/db/vector_clock.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/read_write_concern_defaults_cache_lookup_mongod.cpp b/src/mongo/db/read_write_concern_defaults_cache_lookup_mongod.cpp index 08f95264959..7eaa64d458a 100644 --- a/src/mongo/db/read_write_concern_defaults_cache_lookup_mongod.cpp +++ b/src/mongo/db/read_write_concern_defaults_cache_lookup_mongod.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/read_write_concern_defaults_cache_lookup_mongod.h" @@ -38,6 +37,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/rebuild_indexes.cpp b/src/mongo/db/rebuild_indexes.cpp index c2986396d6a..a872170de77 100644 --- a/src/mongo/db/rebuild_indexes.cpp +++ b/src/mongo/db/rebuild_indexes.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/db/index/index_descriptor.h" #include "mongo/db/index_builds_coordinator.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { StatusWith<IndexNameObjs> getIndexNameObjs(const CollectionPtr& collection, diff --git a/src/mongo/db/record_id_helpers.cpp b/src/mongo/db/record_id_helpers.cpp index 02bad4bad4e..e9147666da8 100644 --- a/src/mongo/db/record_id_helpers.cpp +++ b/src/mongo/db/record_id_helpers.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/db/record_id_helpers.h" @@ -43,6 +42,9 @@ #include "mongo/logv2/redaction.h" #include "mongo/util/debug_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace record_id_helpers { diff --git a/src/mongo/db/repair.cpp b/src/mongo/db/repair.cpp index e3133d91103..85b69329662 100644 --- a/src/mongo/db/repair.cpp +++ b/src/mongo/db/repair.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -62,6 +61,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { using namespace fmt::literals; diff --git a/src/mongo/db/repl/all_database_cloner.cpp b/src/mongo/db/repl/all_database_cloner.cpp index b5856b7aef0..3088b527fde 100644 --- a/src/mongo/db/repl/all_database_cloner.cpp +++ b/src/mongo/db/repl/all_database_cloner.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationInitialSync #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/util/assert_util.h" + +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationInitialSync + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/all_database_cloner_test.cpp b/src/mongo/db/repl/all_database_cloner_test.cpp index ad8aa737c78..99bc4d30e4a 100644 --- a/src/mongo/db/repl/all_database_cloner_test.cpp +++ b/src/mongo/db/repl/all_database_cloner_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/util/clock_source_mock.h" #include "mongo/util/concurrency/thread_pool.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/apply_ops.cpp b/src/mongo/db/repl/apply_ops.cpp index 3add0bae568..1d341317de8 100644 --- a/src/mongo/db/repl/apply_ops.cpp +++ b/src/mongo/db/repl/apply_ops.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -59,6 +58,9 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/apply_ops_command_info.cpp b/src/mongo/db/repl/apply_ops_command_info.cpp index 212bf555290..7ce6ccf0faf 100644 --- a/src/mongo/db/repl/apply_ops_command_info.cpp +++ b/src/mongo/db/repl/apply_ops_command_info.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/logv2/log.h" #include "mongo/logv2/redaction.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/base_cloner.cpp b/src/mongo/db/repl/base_cloner.cpp index b4c7c482331..79a6bd89929 100644 --- a/src/mongo/db/repl/base_cloner.cpp +++ b/src/mongo/db/repl/base_cloner.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace { MONGO_FAIL_POINT_DEFINE(hangBeforeClonerStage); diff --git a/src/mongo/db/repl/bgsync.cpp b/src/mongo/db/repl/bgsync.cpp index 17767d6ca09..de47810f926 100644 --- a/src/mongo/db/repl/bgsync.cpp +++ b/src/mongo/db/repl/bgsync.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -65,6 +64,9 @@ #include "mongo/util/testing_proctor.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { using std::string; diff --git a/src/mongo/db/repl/check_quorum_for_config_change.cpp b/src/mongo/db/repl/check_quorum_for_config_change.cpp index 05af6ca3d90..7e21387c602 100644 --- a/src/mongo/db/repl/check_quorum_for_config_change.cpp +++ b/src/mongo/db/repl/check_quorum_for_config_change.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/rpc/metadata/repl_set_metadata.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/check_quorum_for_config_change_test.cpp b/src/mongo/db/repl/check_quorum_for_config_change_test.cpp index 3565f165ac0..6c1da8db768 100644 --- a/src/mongo/db/repl/check_quorum_for_config_change_test.cpp +++ b/src/mongo/db/repl/check_quorum_for_config_change_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/net/hostandport.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + #define ASSERT_REASON_CONTAINS(STATUS, PATTERN) \ do { \ const mongo::Status s_ = (STATUS); \ diff --git a/src/mongo/db/repl/collection_bulk_loader_impl.cpp b/src/mongo/db/repl/collection_bulk_loader_impl.cpp index 3e190cb7f6f..574607ea257 100644 --- a/src/mongo/db/repl/collection_bulk_loader_impl.cpp +++ b/src/mongo/db/repl/collection_bulk_loader_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/collection_cloner.cpp b/src/mongo/db/repl/collection_cloner.cpp index 0066240cc2f..8800297cb4d 100644 --- a/src/mongo/db/repl/collection_cloner.cpp +++ b/src/mongo/db/repl/collection_cloner.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationInitialSync #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationInitialSync + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/data_replicator_external_state_impl.cpp b/src/mongo/db/repl/data_replicator_external_state_impl.cpp index 00c924ff1ea..8c43a013e9a 100644 --- a/src/mongo/db/repl/data_replicator_external_state_impl.cpp +++ b/src/mongo/db/repl/data_replicator_external_state_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/db/repl/storage_interface.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { namespace { diff --git a/src/mongo/db/repl/database_cloner.cpp b/src/mongo/db/repl/database_cloner.cpp index adeeeb0afb6..d280dce1be3 100644 --- a/src/mongo/db/repl/database_cloner.cpp +++ b/src/mongo/db/repl/database_cloner.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationInitialSync #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationInitialSync + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/drop_pending_collection_reaper.cpp b/src/mongo/db/repl/drop_pending_collection_reaper.cpp index 9b1fe4655ac..6b4e4dc7051 100644 --- a/src/mongo/db/repl/drop_pending_collection_reaper.cpp +++ b/src/mongo/db/repl/drop_pending_collection_reaper.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/hello_response.cpp b/src/mongo/db/repl/hello_response.cpp index a62463cca33..75a7ef153d6 100644 --- a/src/mongo/db/repl/hello_response.cpp +++ b/src/mongo/db/repl/hello_response.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/db/jsobj.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { namespace { diff --git a/src/mongo/db/repl/idempotency_test.cpp b/src/mongo/db/repl/idempotency_test.cpp index e1a8bf39053..9e94154f1c0 100644 --- a/src/mongo/db/repl/idempotency_test.cpp +++ b/src/mongo/db/repl/idempotency_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace repl { namespace { diff --git a/src/mongo/db/repl/initial_sync_base_cloner.cpp b/src/mongo/db/repl/initial_sync_base_cloner.cpp index f91c75aa92d..0a8c2e9edf5 100644 --- a/src/mongo/db/repl/initial_sync_base_cloner.cpp +++ b/src/mongo/db/repl/initial_sync_base_cloner.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationInitialSync #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/db/repl/replication_consistency_markers_impl.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationInitialSync + + namespace mongo { namespace { MONGO_FAIL_POINT_DEFINE(hangBeforeCheckingRollBackIdClonerStage); diff --git a/src/mongo/db/repl/initial_syncer.cpp b/src/mongo/db/repl/initial_syncer.cpp index d1b9b699ada..8e096634799 100644 --- a/src/mongo/db/repl/initial_syncer.cpp +++ b/src/mongo/db/repl/initial_syncer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationInitialSync #include "mongo/platform/basic.h" @@ -79,6 +78,9 @@ #include "mongo/util/timer.h" #include "mongo/util/version/releases.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationInitialSync + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/initial_syncer_common_stats.cpp b/src/mongo/db/repl/initial_syncer_common_stats.cpp index 3d2ec0790d3..34a4b7cad6f 100644 --- a/src/mongo/db/repl/initial_syncer_common_stats.cpp +++ b/src/mongo/db/repl/initial_syncer_common_stats.cpp @@ -26,12 +26,13 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationInitialSync #include "mongo/db/repl/initial_syncer_common_stats.h" #include "mongo/db/commands/server_status_metric.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationInitialSync + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/initial_syncer_test.cpp b/src/mongo/db/repl/initial_syncer_test.cpp index a2ee4f5956a..8bfb35d389c 100644 --- a/src/mongo/db/repl/initial_syncer_test.cpp +++ b/src/mongo/db/repl/initial_syncer_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -81,6 +80,8 @@ #include "mongo/unittest/barrier.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/insert_group.cpp b/src/mongo/db/repl/insert_group.cpp index ef32219e5a9..eea1cd1f03a 100644 --- a/src/mongo/db/repl/insert_group.cpp +++ b/src/mongo/db/repl/insert_group.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/isself.cpp b/src/mongo/db/repl/isself.cpp index 886d5b739e6..cd353b67af6 100644 --- a/src/mongo/db/repl/isself.cpp +++ b/src/mongo/db/repl/isself.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -75,6 +74,9 @@ #include <winsock2.h> #endif // defined(_WIN32) +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/member_data.cpp b/src/mongo/db/repl/member_data.cpp index 9b75818f09d..054e93c6145 100644 --- a/src/mongo/db/repl/member_data.cpp +++ b/src/mongo/db/repl/member_data.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/db/repl/member_data.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/noop_writer.cpp b/src/mongo/db/repl/noop_writer.cpp index ad3fdd197ed..3f0d52efbfa 100644 --- a/src/mongo/db/repl/noop_writer.cpp +++ b/src/mongo/db/repl/noop_writer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/util/concurrency/idle_thread_block.h" #include "mongo/util/testing_proctor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp index 0bb880a6aea..9b9fd4e8c29 100644 --- a/src/mongo/db/repl/oplog.cpp +++ b/src/mongo/db/repl/oplog.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -110,6 +109,9 @@ #include "mongo/util/file.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { using std::endl; diff --git a/src/mongo/db/repl/oplog_applier.cpp b/src/mongo/db/repl/oplog_applier.cpp index 51d3134d565..ffc1a918ceb 100644 --- a/src/mongo/db/repl/oplog_applier.cpp +++ b/src/mongo/db/repl/oplog_applier.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/util/processinfo.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/oplog_applier_impl.cpp b/src/mongo/db/repl/oplog_applier_impl.cpp index 5afadd741d7..2e15cf08c73 100644 --- a/src/mongo/db/repl/oplog_applier_impl.cpp +++ b/src/mongo/db/repl/oplog_applier_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/db/repl/oplog_applier_impl.h" @@ -52,6 +51,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/log_with_sampling.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { namespace { diff --git a/src/mongo/db/repl/oplog_applier_utils.cpp b/src/mongo/db/repl/oplog_applier_utils.cpp index e8a49034d75..44d115b79da 100644 --- a/src/mongo/db/repl/oplog_applier_utils.cpp +++ b/src/mongo/db/repl/oplog_applier_utils.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + MONGO_FAIL_POINT_DEFINE(hangAfterApplyingCollectionDropOplogEntry); namespace mongo { diff --git a/src/mongo/db/repl/oplog_batcher.cpp b/src/mongo/db/repl/oplog_batcher.cpp index e6dddef524d..3e63b20db73 100644 --- a/src/mongo/db/repl/oplog_batcher.cpp +++ b/src/mongo/db/repl/oplog_batcher.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/db/repl/oplog_batcher.h" @@ -37,6 +36,9 @@ #include "mongo/db/repl/repl_server_parameters_gen.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { MONGO_FAIL_POINT_DEFINE(skipOplogBatcherWaitForData); diff --git a/src/mongo/db/repl/oplog_buffer_collection.cpp b/src/mongo/db/repl/oplog_buffer_collection.cpp index 799bf539ca7..823871400f3 100644 --- a/src/mongo/db/repl/oplog_buffer_collection.cpp +++ b/src/mongo/db/repl/oplog_buffer_collection.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/db/repl/storage_interface.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/oplog_buffer_proxy.cpp b/src/mongo/db/repl/oplog_buffer_proxy.cpp index 28497728ff8..db4a11d6e87 100644 --- a/src/mongo/db/repl/oplog_buffer_proxy.cpp +++ b/src/mongo/db/repl/oplog_buffer_proxy.cpp @@ -26,13 +26,15 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" #include "mongo/db/repl/oplog_buffer_proxy.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/oplog_entry.cpp b/src/mongo/db/repl/oplog_entry.cpp index 6426742fc1f..c10101e005f 100644 --- a/src/mongo/db/repl/oplog_entry.cpp +++ b/src/mongo/db/repl/oplog_entry.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/logv2/redaction.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/oplog_fetcher.cpp b/src/mongo/db/repl/oplog_fetcher.cpp index 816b5f19fa6..1f077d47c31 100644 --- a/src/mongo/db/repl/oplog_fetcher.cpp +++ b/src/mongo/db/repl/oplog_fetcher.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/db/repl/oplog_fetcher.h" @@ -49,6 +48,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/oplog_fetcher_mock.cpp b/src/mongo/db/repl/oplog_fetcher_mock.cpp index c9b04835d0c..fc9a8f91d88 100644 --- a/src/mongo/db/repl/oplog_fetcher_mock.cpp +++ b/src/mongo/db/repl/oplog_fetcher_mock.cpp @@ -27,12 +27,13 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/db/repl/oplog_fetcher_mock.h" #include <utility> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/primary_only_service.cpp b/src/mongo/db/repl/primary_only_service.cpp index 778376c9485..9ce8a39d504 100644 --- a/src/mongo/db/repl/primary_only_service.cpp +++ b/src/mongo/db/repl/primary_only_service.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -55,6 +54,9 @@ #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/util/concurrency/thread_pool.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/read_concern_args.cpp b/src/mongo/db/repl/read_concern_args.cpp index 23fb2fc4a48..1c3508780e4 100644 --- a/src/mongo/db/repl/read_concern_args.cpp +++ b/src/mongo/db/repl/read_concern_args.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/db/repl/bson_extract_optime.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + using std::string; namespace mongo { diff --git a/src/mongo/db/repl/repl_client_info.cpp b/src/mongo/db/repl/repl_client_info.cpp index d72d8ca28c3..7a074a79f6a 100644 --- a/src/mongo/db/repl/repl_client_info.cpp +++ b/src/mongo/db/repl/repl_client_info.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/decorable.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/repl_set_commands.cpp b/src/mongo/db/repl/repl_set_commands.cpp index 3a38d9c1830..c7ab0f103a8 100644 --- a/src/mongo/db/repl/repl_set_commands.cpp +++ b/src/mongo/db/repl/repl_set_commands.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #define LOGV2_FOR_HEARTBEATS(ID, DLEVEL, MESSAGE, ...) \ LOGV2_DEBUG_OPTIONS( \ @@ -69,6 +68,9 @@ #include "mongo/util/net/socket_utils.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/repl_set_config.cpp b/src/mongo/db/repl/repl_set_config.cpp index 902435b53e0..a2397b43d0a 100644 --- a/src/mongo/db/repl/repl_set_config.cpp +++ b/src/mongo/db/repl/repl_set_config.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/repl_set_heartbeat_response.cpp b/src/mongo/db/repl/repl_set_heartbeat_response.cpp index ea169eae737..74a5ecac2e8 100644 --- a/src/mongo/db/repl/repl_set_heartbeat_response.cpp +++ b/src/mongo/db/repl/repl_set_heartbeat_response.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { namespace { diff --git a/src/mongo/db/repl/repl_set_test_egress.cpp b/src/mongo/db/repl/repl_set_test_egress.cpp index a023422b4e6..c5842a52baa 100644 --- a/src/mongo/db/repl/repl_set_test_egress.cpp +++ b/src/mongo/db/repl/repl_set_test_egress.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/db/commands.h" #include "mongo/db/operation_context.h" @@ -39,6 +38,9 @@ #include "mongo/util/duration.h" #include "mongo/util/net/hostandport.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { namespace repl { namespace { diff --git a/src/mongo/db/repl/repl_settings.cpp b/src/mongo/db/repl/repl_settings.cpp index 02826a9fbd9..4214f2b0ea8 100644 --- a/src/mongo/db/repl/repl_settings.cpp +++ b/src/mongo/db/repl/repl_settings.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/db/repl/repl_server_parameters_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/replica_set_aware_service.cpp b/src/mongo/db/repl/replica_set_aware_service.cpp index f4851f9fe3d..fb03ce05464 100644 --- a/src/mongo/db/repl/replica_set_aware_service.cpp +++ b/src/mongo/db/repl/replica_set_aware_service.cpp @@ -27,12 +27,14 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" #include "mongo/db/repl/replica_set_aware_service.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/db/repl/replication_consistency_markers_impl.cpp b/src/mongo/db/repl/replication_consistency_markers_impl.cpp index 8e7994669de..c831d6b31da 100644 --- a/src/mongo/db/repl/replication_consistency_markers_impl.cpp +++ b/src/mongo/db/repl/replication_consistency_markers_impl.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/db/storage/control/journal_flusher.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/replication_coordinator.cpp b/src/mongo/db/repl/replication_coordinator.cpp index 52102050341..c5edfbefb4f 100644 --- a/src/mongo/db/repl/replication_coordinator.cpp +++ b/src/mongo/db/repl/replication_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp index d17d11bed06..9d294074c92 100644 --- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -122,6 +121,9 @@ #include "mongo/util/str.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + using namespace fmt::literals; namespace mongo { diff --git a/src/mongo/db/repl/replication_coordinator_external_state_mock.cpp b/src/mongo/db/repl/replication_coordinator_external_state_mock.cpp index 86aaa76c00f..78f07512ac3 100644 --- a/src/mongo/db/repl/replication_coordinator_external_state_mock.cpp +++ b/src/mongo/db/repl/replication_coordinator_external_state_mock.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/util/net/hostandport.h" #include "mongo/util/sequence_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp index c78135dcf59..ec0397ef64c 100644 --- a/src/mongo/db/repl/replication_coordinator_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #define LOGV2_FOR_ELECTION(ID, DLEVEL, MESSAGE, ...) \ LOGV2_DEBUG_OPTIONS( \ @@ -115,6 +114,9 @@ #include "mongo/util/time_support.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp b/src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp index 0c05b9f4a0c..2573b1efdc4 100644 --- a/src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationElection #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationElection + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/replication_coordinator_impl_elect_v1_test.cpp b/src/mongo/db/repl/replication_coordinator_impl_elect_v1_test.cpp index 84b45c40fa5..842826924b4 100644 --- a/src/mongo/db/repl/replication_coordinator_impl_elect_v1_test.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl_elect_v1_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include <boost/optional/optional_io.hpp> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace repl { namespace { diff --git a/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp b/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp index b852947d00d..60f0766a7d1 100644 --- a/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl_heartbeat.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #define LOGV2_FOR_ELECTION(ID, DLEVEL, MESSAGE, ...) \ LOGV2_DEBUG_OPTIONS( \ ID, DLEVEL, {logv2::LogComponent::kReplicationElection}, MESSAGE, ##__VA_ARGS__) @@ -71,6 +70,9 @@ #include "mongo/util/str.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/replication_coordinator_impl_heartbeat_v1_test.cpp b/src/mongo/db/repl/replication_coordinator_impl_heartbeat_v1_test.cpp index 3e962036710..9f5d447f6cb 100644 --- a/src/mongo/db/repl/replication_coordinator_impl_heartbeat_v1_test.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl_heartbeat_v1_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace repl { namespace { diff --git a/src/mongo/db/repl/replication_coordinator_impl_reconfig_test.cpp b/src/mongo/db/repl/replication_coordinator_impl_reconfig_test.cpp index 7d7ca3ec455..796458d0409 100644 --- a/src/mongo/db/repl/replication_coordinator_impl_reconfig_test.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl_reconfig_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace repl { namespace { diff --git a/src/mongo/db/repl/replication_coordinator_impl_test.cpp b/src/mongo/db/repl/replication_coordinator_impl_test.cpp index 218951db1a9..96bf0af77ad 100644 --- a/src/mongo/db/repl/replication_coordinator_impl_test.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -83,6 +82,9 @@ #include "mongo/util/time_support.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace repl { namespace { diff --git a/src/mongo/db/repl/replication_coordinator_test_fixture.cpp b/src/mongo/db/repl/replication_coordinator_test_fixture.cpp index d1bcdcc92ab..101ddcf0bb3 100644 --- a/src/mongo/db/repl/replication_coordinator_test_fixture.cpp +++ b/src/mongo/db/repl/replication_coordinator_test_fixture.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -57,6 +56,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/replication_info.cpp b/src/mongo/db/repl/replication_info.cpp index 110831f1663..e0bd311ba98 100644 --- a/src/mongo/db/repl/replication_info.cpp +++ b/src/mongo/db/repl/replication_info.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC #include "mongo/platform/basic.h" @@ -70,6 +69,9 @@ #include "mongo/util/decimal_counter.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC + + namespace mongo { // Hangs in the beginning of each hello command when set. diff --git a/src/mongo/db/repl/replication_process.cpp b/src/mongo/db/repl/replication_process.cpp index a66110d14be..a5b82235fc6 100644 --- a/src/mongo/db/repl/replication_process.cpp +++ b/src/mongo/db/repl/replication_process.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/replication_recovery.cpp b/src/mongo/db/repl/replication_recovery.cpp index ca20262c266..1964b96403c 100644 --- a/src/mongo/db/repl/replication_recovery.cpp +++ b/src/mongo/db/repl/replication_recovery.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #define LOGV2_FOR_RECOVERY(ID, DLEVEL, MESSAGE, ...) \ LOGV2_DEBUG_OPTIONS(ID, DLEVEL, {logv2::LogComponent::kStorageRecovery}, MESSAGE, ##__VA_ARGS__) @@ -61,6 +60,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/replication_recovery_test.cpp b/src/mongo/db/repl/replication_recovery_test.cpp index 48a95bbce0f..40faf40552a 100644 --- a/src/mongo/db/repl/replication_recovery_test.cpp +++ b/src/mongo/db/repl/replication_recovery_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -58,6 +57,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace repl { namespace { diff --git a/src/mongo/db/repl/reporter.cpp b/src/mongo/db/repl/reporter.cpp index a77fd231732..138d16c54f9 100644 --- a/src/mongo/db/repl/reporter.cpp +++ b/src/mongo/db/repl/reporter.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/destructor_guard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/roll_back_local_operations.cpp b/src/mongo/db/repl/roll_back_local_operations.cpp index 2e04ea7ddcd..bd8e7fd8d6f 100644 --- a/src/mongo/db/repl/roll_back_local_operations.cpp +++ b/src/mongo/db/repl/roll_back_local_operations.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationRollback #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationRollback + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/roll_back_local_operations_test.cpp b/src/mongo/db/repl/roll_back_local_operations_test.cpp index 16e0ccdd678..b71765e33d3 100644 --- a/src/mongo/db/repl/roll_back_local_operations_test.cpp +++ b/src/mongo/db/repl/roll_back_local_operations_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace { using namespace mongo; diff --git a/src/mongo/db/repl/rollback_checker.cpp b/src/mongo/db/repl/rollback_checker.cpp index fd5c6d4b53b..93de51c82a8 100644 --- a/src/mongo/db/repl/rollback_checker.cpp +++ b/src/mongo/db/repl/rollback_checker.cpp @@ -27,12 +27,13 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" #include "mongo/db/repl/rollback_checker.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/rollback_checker_test.cpp b/src/mongo/db/repl/rollback_checker_test.cpp index 3942f3a66c5..935f6b996d5 100644 --- a/src/mongo/db/repl/rollback_checker_test.cpp +++ b/src/mongo/db/repl/rollback_checker_test.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/executor/thread_pool_task_executor_test_fixture.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace { using namespace mongo; diff --git a/src/mongo/db/repl/rollback_impl.cpp b/src/mongo/db/repl/rollback_impl.cpp index d22b1fba8fe..2443730507d 100644 --- a/src/mongo/db/repl/rollback_impl.cpp +++ b/src/mongo/db/repl/rollback_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationRollback #include "mongo/platform/basic.h" @@ -71,6 +70,9 @@ #include "mongo/s/catalog/type_config_version.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationRollback + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/rollback_impl_test.cpp b/src/mongo/db/repl/rollback_impl_test.cpp index e46c4111b8c..8763f8b840d 100644 --- a/src/mongo/db/repl/rollback_impl_test.cpp +++ b/src/mongo/db/repl/rollback_impl_test.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationRollback #include "mongo/platform/basic.h" @@ -57,6 +56,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/uuid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationRollback + + namespace mongo { namespace repl { namespace { diff --git a/src/mongo/db/repl/rs_rollback.cpp b/src/mongo/db/repl/rs_rollback.cpp index b409cae6977..6579e753196 100644 --- a/src/mongo/db/repl/rs_rollback.cpp +++ b/src/mongo/db/repl/rs_rollback.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationRollback #include "mongo/platform/basic.h" @@ -83,6 +82,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationRollback + + namespace mongo { using std::list; diff --git a/src/mongo/db/repl/scatter_gather_runner.cpp b/src/mongo/db/repl/scatter_gather_runner.cpp index f688c5cf0cd..ace6b8492a2 100644 --- a/src/mongo/db/repl/scatter_gather_runner.cpp +++ b/src/mongo/db/repl/scatter_gather_runner.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/session_update_tracker.cpp b/src/mongo/db/repl/session_update_tracker.cpp index 5dce32cecb1..4f695ae7630 100644 --- a/src/mongo/db/repl/session_update_tracker.cpp +++ b/src/mongo/db/repl/session_update_tracker.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { namespace { diff --git a/src/mongo/db/repl/speculative_majority_read_info.cpp b/src/mongo/db/repl/speculative_majority_read_info.cpp index 1c4211d98fc..9664c110ad1 100644 --- a/src/mongo/db/repl/speculative_majority_read_info.cpp +++ b/src/mongo/db/repl/speculative_majority_read_info.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/db/repl/speculative_majority_read_info.h" #include "mongo/util/decorable.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/split_horizon.cpp b/src/mongo/db/repl/split_horizon.cpp index f588445398b..440d9ddcf27 100644 --- a/src/mongo/db/repl/split_horizon.cpp +++ b/src/mongo/db/repl/split_horizon.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/bson/util/bson_extract.h" #include "mongo/db/client.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + using namespace std::literals::string_literals; using std::begin; diff --git a/src/mongo/db/repl/storage_interface_impl.cpp b/src/mongo/db/repl/storage_interface_impl.cpp index f38d94926f8..4a8ba7c2381 100644 --- a/src/mongo/db/repl/storage_interface_impl.cpp +++ b/src/mongo/db/repl/storage_interface_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -87,6 +86,9 @@ #include "mongo/util/background.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/storage_interface_mock.cpp b/src/mongo/db/repl/storage_interface_mock.cpp index 979d50b493b..3cd4344151e 100644 --- a/src/mongo/db/repl/storage_interface_mock.cpp +++ b/src/mongo/db/repl/storage_interface_mock.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include <numeric> @@ -37,6 +36,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/storage_timestamp_test.cpp b/src/mongo/db/repl/storage_timestamp_test.cpp index 023dfa8bf92..aab30454af6 100644 --- a/src/mongo/db/repl/storage_timestamp_test.cpp +++ b/src/mongo/db/repl/storage_timestamp_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -98,6 +97,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/stacktrace.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/repl/sync_source_feedback.cpp b/src/mongo/db/repl/sync_source_feedback.cpp index 0b7b4086b33..9b74f405eb0 100644 --- a/src/mongo/db/repl/sync_source_feedback.cpp +++ b/src/mongo/db/repl/sync_source_feedback.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/sync_source_resolver.cpp b/src/mongo/db/repl/sync_source_resolver.cpp index 69437154c6f..d870eed5bc9 100644 --- a/src/mongo/db/repl/sync_source_resolver.cpp +++ b/src/mongo/db/repl/sync_source_resolver.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/util/destructor_guard.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/task_runner.cpp b/src/mongo/db/repl/task_runner.cpp index 68dbc759256..418505bbbdc 100644 --- a/src/mongo/db/repl/task_runner.cpp +++ b/src/mongo/db/repl/task_runner.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/util/destructor_guard.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/tenant_all_database_cloner.cpp b/src/mongo/db/repl/tenant_all_database_cloner.cpp index 97f89ab2fe7..4b7f3bb26d4 100644 --- a/src/mongo/db/repl/tenant_all_database_cloner.cpp +++ b/src/mongo/db/repl/tenant_all_database_cloner.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/string_map.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/tenant_all_database_cloner_test.cpp b/src/mongo/db/repl/tenant_all_database_cloner_test.cpp index 22765d9eb37..f601d8cb5fe 100644 --- a/src/mongo/db/repl/tenant_all_database_cloner_test.cpp +++ b/src/mongo/db/repl/tenant_all_database_cloner_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/util/clock_source_mock.h" #include "mongo/util/concurrency/thread_pool.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/tenant_base_cloner.cpp b/src/mongo/db/repl/tenant_base_cloner.cpp index 5b3249a73b9..f532c31c69e 100644 --- a/src/mongo/db/repl/tenant_base_cloner.cpp +++ b/src/mongo/db/repl/tenant_base_cloner.cpp @@ -27,13 +27,15 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration #include "mongo/platform/basic.h" #include "mongo/db/repl/tenant_base_cloner.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/tenant_collection_cloner.cpp b/src/mongo/db/repl/tenant_collection_cloner.cpp index cd6ea25a650..9e6d5f7e02a 100644 --- a/src/mongo/db/repl/tenant_collection_cloner.cpp +++ b/src/mongo/db/repl/tenant_collection_cloner.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/rpc/metadata/repl_set_metadata.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/tenant_database_cloner.cpp b/src/mongo/db/repl/tenant_database_cloner.cpp index 7885c67eaa5..2df108b4da7 100644 --- a/src/mongo/db/repl/tenant_database_cloner.cpp +++ b/src/mongo/db/repl/tenant_database_cloner.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/tenant_file_cloner.cpp b/src/mongo/db/repl/tenant_file_cloner.cpp index 6a683ddc03e..83ae3c65fc8 100644 --- a/src/mongo/db/repl/tenant_file_cloner.cpp +++ b/src/mongo/db/repl/tenant_file_cloner.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration + + namespace mongo::repl { // TODO SERVER-63119: Verify if we need the below failpoints for TenantFileCloner unit testing. diff --git a/src/mongo/db/repl/tenant_file_importer_service.cpp b/src/mongo/db/repl/tenant_file_importer_service.cpp index 4e16c773709..09319217ac0 100644 --- a/src/mongo/db/repl/tenant_file_importer_service.cpp +++ b/src/mongo/db/repl/tenant_file_importer_service.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration #include "mongo/db/repl/tenant_file_importer_service.h" @@ -47,6 +46,9 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration + + namespace mongo::repl { using namespace fmt::literals; diff --git a/src/mongo/db/repl/tenant_migration_access_blocker_registry.cpp b/src/mongo/db/repl/tenant_migration_access_blocker_registry.cpp index 60b88542261..405eed89595 100644 --- a/src/mongo/db/repl/tenant_migration_access_blocker_registry.cpp +++ b/src/mongo/db/repl/tenant_migration_access_blocker_registry.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration #include "mongo/db/repl/tenant_migration_access_blocker_registry.h" #include "mongo/db/repl/tenant_migration_access_blocker.h" @@ -37,6 +36,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/concurrency/thread_pool.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration + + namespace mongo { namespace { diff --git a/src/mongo/db/repl/tenant_migration_access_blocker_util.cpp b/src/mongo/db/repl/tenant_migration_access_blocker_util.cpp index 954e88d044a..0cbea9ac7f3 100644 --- a/src/mongo/db/repl/tenant_migration_access_blocker_util.cpp +++ b/src/mongo/db/repl/tenant_migration_access_blocker_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration #include "mongo/platform/basic.h" #include "mongo/util/str.h" @@ -50,6 +49,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/future_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration + + namespace mongo { // Failpoint that will cause recoverTenantMigrationAccessBlockers to return early. diff --git a/src/mongo/db/repl/tenant_migration_donor_access_blocker.cpp b/src/mongo/db/repl/tenant_migration_donor_access_blocker.cpp index 141b2c1e6a5..c282a86c15b 100644 --- a/src/mongo/db/repl/tenant_migration_donor_access_blocker.cpp +++ b/src/mongo/db/repl/tenant_migration_donor_access_blocker.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/future_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration + + namespace mongo { namespace { diff --git a/src/mongo/db/repl/tenant_migration_donor_service.cpp b/src/mongo/db/repl/tenant_migration_donor_service.cpp index 2416406958f..0a19dc1457c 100644 --- a/src/mongo/db/repl/tenant_migration_donor_service.cpp +++ b/src/mongo/db/repl/tenant_migration_donor_service.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration #include "mongo/db/repl/tenant_migration_donor_service.h" @@ -57,6 +56,9 @@ #include "mongo/util/cancellation.h" #include "mongo/util/future_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration + + namespace mongo { namespace { diff --git a/src/mongo/db/repl/tenant_migration_recipient_access_blocker.cpp b/src/mongo/db/repl/tenant_migration_recipient_access_blocker.cpp index 217902da14a..15e1c997f26 100644 --- a/src/mongo/db/repl/tenant_migration_recipient_access_blocker.cpp +++ b/src/mongo/db/repl/tenant_migration_recipient_access_blocker.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/future_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration + + namespace mongo { namespace { diff --git a/src/mongo/db/repl/tenant_migration_recipient_access_blocker_test.cpp b/src/mongo/db/repl/tenant_migration_recipient_access_blocker_test.cpp index 97220febcaa..2b34e333757 100644 --- a/src/mongo/db/repl/tenant_migration_recipient_access_blocker_test.cpp +++ b/src/mongo/db/repl/tenant_migration_recipient_access_blocker_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include <memory> @@ -46,6 +45,9 @@ #include "mongo/util/future.h" #include "mongo/util/net/ssl_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/tenant_migration_recipient_entry_helpers.cpp b/src/mongo/db/repl/tenant_migration_recipient_entry_helpers.cpp index bc798479097..b77606577b2 100644 --- a/src/mongo/db/repl/tenant_migration_recipient_entry_helpers.cpp +++ b/src/mongo/db/repl/tenant_migration_recipient_entry_helpers.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -46,6 +45,8 @@ #include "mongo/db/storage/write_unit_of_work.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/tenant_migration_recipient_op_observer.cpp b/src/mongo/db/repl/tenant_migration_recipient_op_observer.cpp index e52cdecc8b3..79fa28313f4 100644 --- a/src/mongo/db/repl/tenant_migration_recipient_op_observer.cpp +++ b/src/mongo/db/repl/tenant_migration_recipient_op_observer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/db/repl/tenant_migration_recipient_op_observer.h" @@ -42,6 +41,9 @@ #include "mongo/db/repl/tenant_migration_util.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { using namespace fmt; diff --git a/src/mongo/db/repl/tenant_migration_recipient_service.cpp b/src/mongo/db/repl/tenant_migration_recipient_service.cpp index b4c7fba9ff8..476d169364b 100644 --- a/src/mongo/db/repl/tenant_migration_recipient_service.cpp +++ b/src/mongo/db/repl/tenant_migration_recipient_service.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration #include "mongo/platform/basic.h" @@ -81,6 +80,9 @@ #include "mongo/util/cancellation.h" #include "mongo/util/future_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration + + namespace mongo { namespace repl { namespace { diff --git a/src/mongo/db/repl/tenant_migration_recipient_service_test.cpp b/src/mongo/db/repl/tenant_migration_recipient_service_test.cpp index 508ab280825..a2257a0da84 100644 --- a/src/mongo/db/repl/tenant_migration_recipient_service_test.cpp +++ b/src/mongo/db/repl/tenant_migration_recipient_service_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include <boost/optional/optional_io.hpp> #include <fstream> @@ -74,6 +73,9 @@ #include "mongo/util/future.h" #include "mongo/util/net/ssl_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/tenant_migration_shard_merge_util.cpp b/src/mongo/db/repl/tenant_migration_shard_merge_util.cpp index 2ef76d6839f..ea28ec1aafe 100644 --- a/src/mongo/db/repl/tenant_migration_shard_merge_util.cpp +++ b/src/mongo/db/repl/tenant_migration_shard_merge_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration #include "mongo/db/repl/tenant_migration_shard_merge_util.h" @@ -52,6 +51,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/future_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration + + // Keep the backup cursor alive by pinging twice as often as the donor's default // cursor timeout. constexpr int kBackupCursorKeepAliveIntervalMillis = mongo::kCursorTimeoutMillisDefault / 2; diff --git a/src/mongo/db/repl/tenant_oplog_applier.cpp b/src/mongo/db/repl/tenant_oplog_applier.cpp index ed6a035e244..f33c6ff312c 100644 --- a/src/mongo/db/repl/tenant_oplog_applier.cpp +++ b/src/mongo/db/repl/tenant_oplog_applier.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration #include "mongo/platform/basic.h" @@ -57,6 +56,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/concurrency/thread_pool.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/tenant_oplog_applier_test.cpp b/src/mongo/db/repl/tenant_oplog_applier_test.cpp index 460865c8ed4..59061054491 100644 --- a/src/mongo/db/repl/tenant_oplog_applier_test.cpp +++ b/src/mongo/db/repl/tenant_oplog_applier_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -55,6 +54,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/log_test.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { using executor::TaskExecutor; diff --git a/src/mongo/db/repl/tenant_oplog_batcher.cpp b/src/mongo/db/repl/tenant_oplog_batcher.cpp index c7a3bf3c87b..68210c4bdfb 100644 --- a/src/mongo/db/repl/tenant_oplog_batcher.cpp +++ b/src/mongo/db/repl/tenant_oplog_batcher.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/db/repl/oplog_batcher.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration + + namespace mongo { namespace repl { TenantOplogBatcher::TenantOplogBatcher(const std::string& tenantId, diff --git a/src/mongo/db/repl/tenant_oplog_batcher_test.cpp b/src/mongo/db/repl/tenant_oplog_batcher_test.cpp index f7f3409b2fa..cc62d4b8de2 100644 --- a/src/mongo/db/repl/tenant_oplog_batcher_test.cpp +++ b/src/mongo/db/repl/tenant_oplog_batcher_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/log_test.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { using executor::TaskExecutor; diff --git a/src/mongo/db/repl/topology_coordinator.cpp b/src/mongo/db/repl/topology_coordinator.cpp index 0b91a57a59b..05aa6620ed8 100644 --- a/src/mongo/db/repl/topology_coordinator.cpp +++ b/src/mongo/db/repl/topology_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #define LOGV2_FOR_ELECTION(ID, DLEVEL, MESSAGE, ...) \ LOGV2_DEBUG_OPTIONS( \ @@ -66,6 +65,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/topology_coordinator_v1_test.cpp b/src/mongo/db/repl/topology_coordinator_v1_test.cpp index 3898035b08c..1d2587bb48e 100644 --- a/src/mongo/db/repl/topology_coordinator_v1_test.cpp +++ b/src/mongo/db/repl/topology_coordinator_v1_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -59,6 +58,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + #define ASSERT_NO_ACTION(EXPRESSION) \ ASSERT_EQUALS(mongo::repl::HeartbeatResponseAction::NoAction, (EXPRESSION)) diff --git a/src/mongo/db/repl/topology_version_observer.cpp b/src/mongo/db/repl/topology_version_observer.cpp index de1eb704db8..07eb6c5f327 100644 --- a/src/mongo/db/repl/topology_version_observer.cpp +++ b/src/mongo/db/repl/topology_version_observer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/db/repl/topology_version_observer.h" @@ -38,6 +37,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/topology_version_observer_test.cpp b/src/mongo/db/repl/topology_version_observer_test.cpp index 6d7d54d57b8..c4254703091 100644 --- a/src/mongo/db/repl/topology_version_observer_test.cpp +++ b/src/mongo/db/repl/topology_version_observer_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace repl { namespace { diff --git a/src/mongo/db/repl/transaction_oplog_application.cpp b/src/mongo/db/repl/transaction_oplog_application.cpp index f3a1fcea541..4c551bd6187 100644 --- a/src/mongo/db/repl/transaction_oplog_application.cpp +++ b/src/mongo/db/repl/transaction_oplog_application.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/db/transaction_participant.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { using repl::OplogEntry; namespace { diff --git a/src/mongo/db/repl/vote_requester.cpp b/src/mongo/db/repl/vote_requester.cpp index f57765dc73c..7ce94e116c4 100644 --- a/src/mongo/db/repl/vote_requester.cpp +++ b/src/mongo/db/repl/vote_requester.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationElection #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplicationElection + + namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/wait_for_majority_service.cpp b/src/mongo/db/repl/wait_for_majority_service.cpp index eb288cb6ef5..5d448cdd3d3 100644 --- a/src/mongo/db/repl/wait_for_majority_service.cpp +++ b/src/mongo/db/repl/wait_for_majority_service.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/util/future_util.h" #include "mongo/util/static_immortal.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/repl_index_build_state.cpp b/src/mongo/db/repl_index_build_state.cpp index 0d390f50963..3b84477aac3 100644 --- a/src/mongo/db/repl_index_build_state.cpp +++ b/src/mongo/db/repl_index_build_state.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/db/repl/tenant_migration_access_blocker_util.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/s/active_migrations_registry.cpp b/src/mongo/db/s/active_migrations_registry.cpp index baaa763daaa..81bc4eb2718 100644 --- a/src/mongo/db/s/active_migrations_registry.cpp +++ b/src/mongo/db/s/active_migrations_registry.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kShardingMigration #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kShardingMigration + + namespace mongo { namespace { diff --git a/src/mongo/db/s/add_shard_cmd.cpp b/src/mongo/db/s/add_shard_cmd.cpp index 3bfc1cc4a18..e839049e525 100644 --- a/src/mongo/db/s/add_shard_cmd.cpp +++ b/src/mongo/db/s/add_shard_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/s/balancer_configuration.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/auto_split_vector.cpp b/src/mongo/db/s/auto_split_vector.cpp index 45bc6ffe8b5..c57badbc33a 100644 --- a/src/mongo/db/s/auto_split_vector.cpp +++ b/src/mongo/db/s/auto_split_vector.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/auto_split_vector_command.cpp b/src/mongo/db/s/auto_split_vector_command.cpp index 821527cac7d..2c2795310ff 100644 --- a/src/mongo/db/s/auto_split_vector_command.cpp +++ b/src/mongo/db/s/auto_split_vector_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/authorization_session.h" #include "mongo/db/commands.h" @@ -36,6 +35,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/request_types/auto_split_vector_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/auto_split_vector_test.cpp b/src/mongo/db/s/auto_split_vector_test.cpp index d2aedda2588..e17fd7b70ca 100644 --- a/src/mongo/db/s/auto_split_vector_test.cpp +++ b/src/mongo/db/s/auto_split_vector_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/db/catalog/create_collection.h" #include "mongo/db/db_raii.h" @@ -40,6 +39,9 @@ #include "mongo/logv2/log.h" #include "mongo/platform/random.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/balancer/balance_stats.cpp b/src/mongo/db/s/balancer/balance_stats.cpp index 0ffaff0d0e8..7c44fc66037 100644 --- a/src/mongo/db/s/balancer/balance_stats.cpp +++ b/src/mongo/db/s/balancer/balance_stats.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/s/chunk_manager.h" #include "mongo/stdx/unordered_map.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { int64_t getMaxChunkImbalanceCount(const ChunkManager& routingInfo, diff --git a/src/mongo/db/s/balancer/balancer.cpp b/src/mongo/db/s/balancer/balancer.cpp index 37fd6eee24b..37ebe25150c 100644 --- a/src/mongo/db/s/balancer/balancer.cpp +++ b/src/mongo/db/s/balancer/balancer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/s/balancer/balancer.h" @@ -68,6 +67,9 @@ #include "mongo/util/timer.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { using std::map; diff --git a/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp b/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp index c9a41e33c09..8a361cbf912 100644 --- a/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp +++ b/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/s/grid.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/balancer/balancer_commands_scheduler_impl.cpp b/src/mongo/db/s/balancer/balancer_commands_scheduler_impl.cpp index 1234acfa6b0..3fafb80734c 100644 --- a/src/mongo/db/s/balancer/balancer_commands_scheduler_impl.cpp +++ b/src/mongo/db/s/balancer/balancer_commands_scheduler_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/s/balancer/balancer_commands_scheduler_impl.h" #include "mongo/db/client.h" @@ -40,6 +39,9 @@ #include "mongo/s/shard_key_pattern.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/balancer/balancer_defragmentation_policy_impl.cpp b/src/mongo/db/s/balancer/balancer_defragmentation_policy_impl.cpp index 5563223fb0a..357a6e57562 100644 --- a/src/mongo/db/s/balancer/balancer_defragmentation_policy_impl.cpp +++ b/src/mongo/db/s/balancer/balancer_defragmentation_policy_impl.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/s/balancer/balancer_defragmentation_policy_impl.h" #include "mongo/db/dbdirectclient.h" @@ -42,6 +41,9 @@ #include <fmt/format.h> #include <tuple> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + using namespace fmt::literals; namespace mongo { diff --git a/src/mongo/db/s/balancer/balancer_policy.cpp b/src/mongo/db/s/balancer/balancer_policy.cpp index 96619b52c80..50f54efd626 100644 --- a/src/mongo/db/s/balancer/balancer_policy.cpp +++ b/src/mongo/db/s/balancer/balancer_policy.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { MONGO_FAIL_POINT_DEFINE(balancerShouldReturnRandomMigrations); diff --git a/src/mongo/db/s/balancer/balancer_policy_test.cpp b/src/mongo/db/s/balancer/balancer_policy_test.cpp index 0a53200149e..d32e163b090 100644 --- a/src/mongo/db/s/balancer/balancer_policy_test.cpp +++ b/src/mongo/db/s/balancer/balancer_policy_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/s/catalog/type_chunk.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/balancer/cluster_chunks_resize_policy_impl.cpp b/src/mongo/db/s/balancer/cluster_chunks_resize_policy_impl.cpp index 53d316edf25..fff02fd0026 100644 --- a/src/mongo/db/s/balancer/cluster_chunks_resize_policy_impl.cpp +++ b/src/mongo/db/s/balancer/cluster_chunks_resize_policy_impl.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/s/balancer/cluster_chunks_resize_policy_impl.h" #include "mongo/db/dbdirectclient.h" @@ -34,6 +33,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/balancer/cluster_statistics_impl.cpp b/src/mongo/db/s/balancer/cluster_statistics_impl.cpp index 495e8a77774..79554bb36dd 100644 --- a/src/mongo/db/s/balancer/cluster_statistics_impl.cpp +++ b/src/mongo/db/s/balancer/cluster_statistics_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/s/shard_util.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/balancer_stats_registry.cpp b/src/mongo/db/s/balancer_stats_registry.cpp index 0d664c0762c..5fdc27d3719 100644 --- a/src/mongo/db/s/balancer_stats_registry.cpp +++ b/src/mongo/db/s/balancer_stats_registry.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/s/balancer_stats_registry.h" @@ -40,6 +39,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/sharding_feature_flags_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/check_sharding_index_command.cpp b/src/mongo/db/s/check_sharding_index_command.cpp index 16dbbf8a2fe..1422dc7c4c8 100644 --- a/src/mongo/db/s/check_sharding_index_command.cpp +++ b/src/mongo/db/s/check_sharding_index_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/db/keypattern.h" #include "mongo/db/s/shard_key_index_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/chunk_move_write_concern_options.cpp b/src/mongo/db/s/chunk_move_write_concern_options.cpp index f7edb110c45..151596b2f49 100644 --- a/src/mongo/db/s/chunk_move_write_concern_options.cpp +++ b/src/mongo/db/s/chunk_move_write_concern_options.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/db/service_context.h" #include "mongo/s/request_types/migration_secondary_throttle_options.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/chunk_split_state_driver.cpp b/src/mongo/db/s/chunk_split_state_driver.cpp index 86591c17cb6..ee90ff4fc50 100644 --- a/src/mongo/db/s/chunk_split_state_driver.cpp +++ b/src/mongo/db/s/chunk_split_state_driver.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { std::shared_ptr<ChunkSplitStateDriver> ChunkSplitStateDriver::tryInitiateSplit( diff --git a/src/mongo/db/s/chunk_splitter.cpp b/src/mongo/db/s/chunk_splitter.cpp index f61abc59eaf..fe09971651c 100644 --- a/src/mongo/db/s/chunk_splitter.cpp +++ b/src/mongo/db/s/chunk_splitter.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/s/chunk_splitter.h" @@ -53,6 +52,9 @@ #include "mongo/s/shard_util.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/cleanup_orphaned_cmd.cpp b/src/mongo/db/s/cleanup_orphaned_cmd.cpp index bafce292e49..431a5b8000d 100644 --- a/src/mongo/db/s/cleanup_orphaned_cmd.cpp +++ b/src/mongo/db/s/cleanup_orphaned_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -53,6 +52,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/request_types/migration_secondary_throttle_options.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/s/clone_catalog_data_command.cpp b/src/mongo/db/s/clone_catalog_data_command.cpp index cdfde40535b..692bed243fd 100644 --- a/src/mongo/db/s/clone_catalog_data_command.cpp +++ b/src/mongo/db/s/clone_catalog_data_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/action_set.h" #include "mongo/db/auth/authorization_session.h" @@ -42,6 +41,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/clone_catalog_data_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/collection_metadata.cpp b/src/mongo/db/s/collection_metadata.cpp index ea9f6f0c7c1..87a773ed7fd 100644 --- a/src/mongo/db/s/collection_metadata.cpp +++ b/src/mongo/db/s/collection_metadata.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/s/catalog/type_chunk.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { using namespace fmt::literals; diff --git a/src/mongo/db/s/collection_sharding_runtime.cpp b/src/mongo/db/s/collection_sharding_runtime.cpp index 4f908259d3c..eaaed8365f7 100644 --- a/src/mongo/db/s/collection_sharding_runtime.cpp +++ b/src/mongo/db/s/collection_sharding_runtime.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/s/collection_sharding_runtime.h" @@ -44,6 +43,9 @@ #include "mongo/s/type_collection_common_types_gen.h" #include "mongo/util/duration.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/collection_sharding_state.cpp b/src/mongo/db/s/collection_sharding_state.cpp index 03cb0dd10fa..d3a14d0d005 100644 --- a/src/mongo/db/s/collection_sharding_state.cpp +++ b/src/mongo/db/s/collection_sharding_state.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/string_map.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/collection_sharding_state_factory_shard.cpp b/src/mongo/db/s/collection_sharding_state_factory_shard.cpp index 7c020bfa286..8a1b65fa270 100644 --- a/src/mongo/db/s/collection_sharding_state_factory_shard.cpp +++ b/src/mongo/db/s/collection_sharding_state_factory_shard.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/executor/network_interface_thread_pool.h" #include "mongo/executor/thread_pool_task_executor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { CollectionShardingStateFactoryShard::CollectionShardingStateFactoryShard( ServiceContext* serviceContext) diff --git a/src/mongo/db/s/collection_sharding_state_factory_standalone.cpp b/src/mongo/db/s/collection_sharding_state_factory_standalone.cpp index 6422dc066f1..6251ba8d786 100644 --- a/src/mongo/db/s/collection_sharding_state_factory_standalone.cpp +++ b/src/mongo/db/s/collection_sharding_state_factory_standalone.cpp @@ -27,12 +27,14 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" #include "mongo/db/s/collection_sharding_state_factory_standalone.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/collmod_coordinator.cpp b/src/mongo/db/s/collmod_coordinator.cpp index 3ad2fe44440..4417a0dab5a 100644 --- a/src/mongo/db/s/collmod_coordinator.cpp +++ b/src/mongo/db/s/collmod_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/s/collmod_coordinator.h" @@ -51,6 +50,9 @@ #include "mongo/s/grid.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { MONGO_FAIL_POINT_DEFINE(collModBeforeConfigServerUpdate); diff --git a/src/mongo/db/s/collmod_coordinator_pre60_compatible.cpp b/src/mongo/db/s/collmod_coordinator_pre60_compatible.cpp index fad015c8fd7..c40e3df778f 100644 --- a/src/mongo/db/s/collmod_coordinator_pre60_compatible.cpp +++ b/src/mongo/db/s/collmod_coordinator_pre60_compatible.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/s/collmod_coordinator_pre60_compatible.h" @@ -47,6 +46,9 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/compact_structured_encryption_data_coordinator.cpp b/src/mongo/db/s/compact_structured_encryption_data_coordinator.cpp index 3fcfe10062a..74801e86721 100644 --- a/src/mongo/db/s/compact_structured_encryption_data_coordinator.cpp +++ b/src/mongo/db/s/compact_structured_encryption_data_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/db/persistent_task_store.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_abort_reshard_collection_command.cpp b/src/mongo/db/s/config/configsvr_abort_reshard_collection_command.cpp index 9cb503a2979..5c3c95d66fb 100644 --- a/src/mongo/db/s/config/configsvr_abort_reshard_collection_command.cpp +++ b/src/mongo/db/s/config/configsvr_abort_reshard_collection_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/s/request_types/abort_reshard_collection_gen.h" #include "mongo/s/resharding/resharding_feature_flag_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_add_shard_command.cpp b/src/mongo/db/s/config/configsvr_add_shard_command.cpp index 7e45c082250..d35c3a38062 100644 --- a/src/mongo/db/s/config/configsvr_add_shard_command.cpp +++ b/src/mongo/db/s/config/configsvr_add_shard_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/s/request_types/add_shard_request_type.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_add_shard_to_zone_command.cpp b/src/mongo/db/s/config/configsvr_add_shard_to_zone_command.cpp index ceeec797466..cb0c78ce8e4 100644 --- a/src/mongo/db/s/config/configsvr_add_shard_to_zone_command.cpp +++ b/src/mongo/db/s/config/configsvr_add_shard_to_zone_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/s/request_types/add_shard_to_zone_request_type.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_balancer_collection_status_command.cpp b/src/mongo/db/s/config/configsvr_balancer_collection_status_command.cpp index 1791cab3943..b4ef7e6b4aa 100644 --- a/src/mongo/db/s/config/configsvr_balancer_collection_status_command.cpp +++ b/src/mongo/db/s/config/configsvr_balancer_collection_status_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/balancer_collection_status_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_cleanup_reshard_collection_command.cpp b/src/mongo/db/s/config/configsvr_cleanup_reshard_collection_command.cpp index e8a256be75a..d3a253f6610 100644 --- a/src/mongo/db/s/config/configsvr_cleanup_reshard_collection_command.cpp +++ b/src/mongo/db/s/config/configsvr_cleanup_reshard_collection_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/s/request_types/cleanup_reshard_collection_gen.h" #include "mongo/s/resharding/resharding_feature_flag_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_clear_jumbo_flag_command.cpp b/src/mongo/db/s/config/configsvr_clear_jumbo_flag_command.cpp index c87f8884cee..b61913162b0 100644 --- a/src/mongo/db/s/config/configsvr_clear_jumbo_flag_command.cpp +++ b/src/mongo/db/s/config/configsvr_clear_jumbo_flag_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_collmod_command.cpp b/src/mongo/db/s/config/configsvr_collmod_command.cpp index 624614e6525..c0530839b2e 100644 --- a/src/mongo/db/s/config/configsvr_collmod_command.cpp +++ b/src/mongo/db/s/config/configsvr_collmod_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/action_type.h" #include "mongo/db/auth/authorization_session.h" @@ -42,6 +41,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp b/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp index baebf46dd24..9dcff9c96d0 100644 --- a/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp +++ b/src/mongo/db/s/config/configsvr_commit_chunk_migration_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/commit_chunk_migration_request_type.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_commit_reshard_collection_command.cpp b/src/mongo/db/s/config/configsvr_commit_reshard_collection_command.cpp index fb67df820c4..617601563f0 100644 --- a/src/mongo/db/s/config/configsvr_commit_reshard_collection_command.cpp +++ b/src/mongo/db/s/config/configsvr_commit_reshard_collection_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/s/request_types/commit_reshard_collection_gen.h" #include "mongo/s/resharding/resharding_feature_flag_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_configure_collection_balancing.cpp b/src/mongo/db/s/config/configsvr_configure_collection_balancing.cpp index a9db28064b5..7c0a17d356d 100644 --- a/src/mongo/db/s/config/configsvr_configure_collection_balancing.cpp +++ b/src/mongo/db/s/config/configsvr_configure_collection_balancing.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/configure_collection_balancing_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_coordinator.cpp b/src/mongo/db/s/config/configsvr_coordinator.cpp index 2c4eeccbb4f..8952273e8eb 100644 --- a/src/mongo/db/s/config/configsvr_coordinator.cpp +++ b/src/mongo/db/s/config/configsvr_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/future_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { MONGO_FAIL_POINT_DEFINE(hangBeforeRunningConfigsvrCoordinatorInstance); diff --git a/src/mongo/db/s/config/configsvr_coordinator_service.cpp b/src/mongo/db/s/config/configsvr_coordinator_service.cpp index d7ff2d006e0..72a6c0fbcd0 100644 --- a/src/mongo/db/s/config/configsvr_coordinator_service.cpp +++ b/src/mongo/db/s/config/configsvr_coordinator_service.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/db/s/config/set_user_write_block_mode_coordinator.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { ConfigsvrCoordinatorService* ConfigsvrCoordinatorService::getService(OperationContext* opCtx) { diff --git a/src/mongo/db/s/config/configsvr_create_database_command.cpp b/src/mongo/db/s/config/configsvr_create_database_command.cpp index e5a558c9dc3..839da4952d2 100644 --- a/src/mongo/db/s/config/configsvr_create_database_command.cpp +++ b/src/mongo/db/s/config/configsvr_create_database_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/s/request_types/sharded_ddl_commands_gen.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_move_chunk_command.cpp b/src/mongo/db/s/config/configsvr_move_chunk_command.cpp index 9181958516e..c5b0b0d934e 100644 --- a/src/mongo/db/s/config/configsvr_move_chunk_command.cpp +++ b/src/mongo/db/s/config/configsvr_move_chunk_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/s/request_types/balance_chunk_request_type.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_move_range_command.cpp b/src/mongo/db/s/config/configsvr_move_range_command.cpp index dcf1eaddc80..7fbb7132fcb 100644 --- a/src/mongo/db/s/config/configsvr_move_range_command.cpp +++ b/src/mongo/db/s/config/configsvr_move_range_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/db/auth/action_type.h" #include "mongo/db/auth/authorization_session.h" @@ -37,6 +36,9 @@ #include "mongo/s/request_types/move_range_request_gen.h" #include "mongo/s/sharding_feature_flags_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_refine_collection_shard_key_command.cpp b/src/mongo/db/s/config/configsvr_refine_collection_shard_key_command.cpp index 22966a769fa..01c13128c15 100644 --- a/src/mongo/db/s/config/configsvr_refine_collection_shard_key_command.cpp +++ b/src/mongo/db/s/config/configsvr_refine_collection_shard_key_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/audit.h" #include "mongo/db/auth/authorization_session.h" @@ -40,6 +39,9 @@ #include "mongo/s/request_types/sharded_ddl_commands_gen.h" #include "mongo/s/stale_shard_version_helpers.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_remove_chunks_command.cpp b/src/mongo/db/s/config/configsvr_remove_chunks_command.cpp index c08c93b9d8e..12f5714e11c 100644 --- a/src/mongo/db/s/config/configsvr_remove_chunks_command.cpp +++ b/src/mongo/db/s/config/configsvr_remove_chunks_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/s/catalog/type_chunk.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_remove_shard_command.cpp b/src/mongo/db/s/config/configsvr_remove_shard_command.cpp index 59dc5df70d4..167f9be672f 100644 --- a/src/mongo/db/s/config/configsvr_remove_shard_command.cpp +++ b/src/mongo/db/s/config/configsvr_remove_shard_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/s/grid.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_remove_shard_from_zone_command.cpp b/src/mongo/db/s/config/configsvr_remove_shard_from_zone_command.cpp index 7c9dc06926e..6146e133fa7 100644 --- a/src/mongo/db/s/config/configsvr_remove_shard_from_zone_command.cpp +++ b/src/mongo/db/s/config/configsvr_remove_shard_from_zone_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/s/request_types/remove_shard_from_zone_request_type.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_remove_tags_command.cpp b/src/mongo/db/s/config/configsvr_remove_tags_command.cpp index 8305df53603..6bed282ca35 100644 --- a/src/mongo/db/s/config/configsvr_remove_tags_command.cpp +++ b/src/mongo/db/s/config/configsvr_remove_tags_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/s/catalog/type_tags.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_rename_collection_metadata_command.cpp b/src/mongo/db/s/config/configsvr_rename_collection_metadata_command.cpp index 87a069ec3f4..0f06bb96f1f 100644 --- a/src/mongo/db/s/config/configsvr_rename_collection_metadata_command.cpp +++ b/src/mongo/db/s/config/configsvr_rename_collection_metadata_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -41,6 +40,8 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_repair_sharded_collection_chunks_history_command.cpp b/src/mongo/db/s/config/configsvr_repair_sharded_collection_chunks_history_command.cpp index 615e1098ccc..ba05c5448e4 100644 --- a/src/mongo/db/s/config/configsvr_repair_sharded_collection_chunks_history_command.cpp +++ b/src/mongo/db/s/config/configsvr_repair_sharded_collection_chunks_history_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_reshard_collection_cmd.cpp b/src/mongo/db/s/config/configsvr_reshard_collection_cmd.cpp index c30d0e12ecf..4f3e3a3a93e 100644 --- a/src/mongo/db/s/config/configsvr_reshard_collection_cmd.cpp +++ b/src/mongo/db/s/config/configsvr_reshard_collection_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/s/request_types/reshard_collection_gen.h" #include "mongo/s/resharding/resharding_feature_flag_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { MONGO_FAIL_POINT_DEFINE(reshardCollectionJoinedExistingOperation); diff --git a/src/mongo/db/s/config/configsvr_run_restore_command.cpp b/src/mongo/db/s/config/configsvr_run_restore_command.cpp index 166c10a4e70..24fb363453e 100644 --- a/src/mongo/db/s/config/configsvr_run_restore_command.cpp +++ b/src/mongo/db/s/config/configsvr_run_restore_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/authorization_session.h" #include "mongo/db/catalog/create_collection.h" @@ -39,6 +38,9 @@ #include "mongo/logv2/log.h" #include "mongo/stdx/unordered_map.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_set_allow_migrations_command.cpp b/src/mongo/db/s/config/configsvr_set_allow_migrations_command.cpp index 01c3032aa40..3f1ab04849f 100644 --- a/src/mongo/db/s/config/configsvr_set_allow_migrations_command.cpp +++ b/src/mongo/db/s/config/configsvr_set_allow_migrations_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/db/s/config/sharding_catalog_manager.h" #include "mongo/s/request_types/set_allow_migrations_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_set_cluster_parameter_command.cpp b/src/mongo/db/s/config/configsvr_set_cluster_parameter_command.cpp index da76faa6593..a7e6b1740b3 100644 --- a/src/mongo/db/s/config/configsvr_set_cluster_parameter_command.cpp +++ b/src/mongo/db/s/config/configsvr_set_cluster_parameter_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_set_user_write_block_mode_command.cpp b/src/mongo/db/s/config/configsvr_set_user_write_block_mode_command.cpp index 05414da45f9..edb57945e97 100644 --- a/src/mongo/db/s/config/configsvr_set_user_write_block_mode_command.cpp +++ b/src/mongo/db/s/config/configsvr_set_user_write_block_mode_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_split_chunk_command.cpp b/src/mongo/db/s/config/configsvr_split_chunk_command.cpp index 831f9ca6eb5..eca7baf2f00 100644 --- a/src/mongo/db/s/config/configsvr_split_chunk_command.cpp +++ b/src/mongo/db/s/config/configsvr_split_chunk_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/s/grid.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_update_zone_key_range_command.cpp b/src/mongo/db/s/config/configsvr_update_zone_key_range_command.cpp index 665d52f1ff4..f185235c1b8 100644 --- a/src/mongo/db/s/config/configsvr_update_zone_key_range_command.cpp +++ b/src/mongo/db/s/config/configsvr_update_zone_key_range_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/s/request_types/update_zone_key_range_request_type.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/initial_split_policy.cpp b/src/mongo/db/s/config/initial_split_policy.cpp index 5bdfb55d6c3..8d272e3d6f0 100644 --- a/src/mongo/db/s/config/initial_split_policy.cpp +++ b/src/mongo/db/s/config/initial_split_policy.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/s/shard_util.h" #include "mongo/stdx/unordered_map.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/initial_split_policy_test.cpp b/src/mongo/db/s/config/initial_split_policy_test.cpp index fa8c312f8b7..2eea0b6905f 100644 --- a/src/mongo/db/s/config/initial_split_policy_test.cpp +++ b/src/mongo/db/s/config/initial_split_policy_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/s/catalog/type_tags.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/set_cluster_parameter_coordinator.cpp b/src/mongo/db/s/config/set_cluster_parameter_coordinator.cpp index 07f812c3e51..74116b0dc92 100644 --- a/src/mongo/db/s/config/set_cluster_parameter_coordinator.cpp +++ b/src/mongo/db/s/config/set_cluster_parameter_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/set_user_write_block_mode_coordinator.cpp b/src/mongo/db/s/config/set_user_write_block_mode_coordinator.cpp index e719bdecc40..bb120a68771 100644 --- a/src/mongo/db/s/config/set_user_write_block_mode_coordinator.cpp +++ b/src/mongo/db/s/config/set_user_write_block_mode_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/sharding_catalog_manager.cpp b/src/mongo/db/s/config/sharding_catalog_manager.cpp index 6fbb06a0668..09f1ade5011 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager.cpp @@ -28,7 +28,6 @@ */ #include "mongo/db/ops/write_ops_parsers.h" -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -67,6 +66,9 @@ #include "mongo/transport/service_entry_point.h" #include "mongo/util/log_and_backoff.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/sharding_catalog_manager_add_shard_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_add_shard_test.cpp index 0ed9c76d0f0..8d187d683f5 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_add_shard_test.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_add_shard_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -60,6 +59,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/version/releases.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/sharding_catalog_manager_bump_collection_version_and_change_metadata_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_bump_collection_version_and_change_metadata_test.cpp index 82ddf586f76..c921f7507a1 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_bump_collection_version_and_change_metadata_test.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_bump_collection_version_and_change_metadata_test.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/sharding_catalog_manager_chunk_operations.cpp b/src/mongo/db/s/config/sharding_catalog_manager_chunk_operations.cpp index 172729b575b..7e056459bd4 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_chunk_operations.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_chunk_operations.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -65,6 +64,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/sharding_catalog_manager_collection_operations.cpp b/src/mongo/db/s/config/sharding_catalog_manager_collection_operations.cpp index 6b2538bfeca..08ef1b7bb5b 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_collection_operations.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_collection_operations.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -83,6 +82,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/sharding_catalog_manager_commit_chunk_migration_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_commit_chunk_migration_test.cpp index 32cf2b1b189..67e312acfeb 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_commit_chunk_migration_test.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_commit_chunk_migration_test.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/s/catalog/type_shard.h" #include "mongo/s/client/shard_registry.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/sharding_catalog_manager_database_operations.cpp b/src/mongo/db/s/config/sharding_catalog_manager_database_operations.cpp index 934eca19e8e..7d54896a8d7 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_database_operations.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_database_operations.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/s/config/sharding_catalog_manager.h" @@ -50,6 +49,9 @@ #include "mongo/s/shard_util.h" #include "mongo/s/sharding_feature_flags_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/sharding_catalog_manager_remove_shard_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_remove_shard_test.cpp index d760e1ce3d5..e1a9d8e9ea5 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_remove_shard_test.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_remove_shard_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -51,6 +50,9 @@ #include "mongo/stdx/chrono.h" #include "mongo/stdx/future.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/sharding_catalog_manager_shard_collection_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_shard_collection_test.cpp index 6b15afaf5b0..0d5be679227 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_shard_collection_test.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_shard_collection_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include <vector> @@ -44,6 +43,9 @@ #include "mongo/s/request_types/sharded_ddl_commands_gen.h" #include "mongo/s/shard_key_pattern.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp b/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp index c6e1055ede9..4006fdee86c 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -93,6 +92,9 @@ #include "mongo/util/str.h" #include "mongo/util/version/releases.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config/sharding_catalog_manager_zone_operations.cpp b/src/mongo/db/s/config/sharding_catalog_manager_zone_operations.cpp index ec31cf0ca9f..6bdfb5d7655 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_zone_operations.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_zone_operations.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/s/grid.h" #include "mongo/s/shard_key_pattern.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/config_server_op_observer.cpp b/src/mongo/db/s/config_server_op_observer.cpp index fe73090a366..300efa0c974 100644 --- a/src/mongo/db/s/config_server_op_observer.cpp +++ b/src/mongo/db/s/config_server_op_observer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/s/catalog/type_shard.h" #include "mongo/s/cluster_identity_loader.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/create_collection_coordinator.cpp b/src/mongo/db/s/create_collection_coordinator.cpp index 347cda39428..277eaf7b3e0 100644 --- a/src/mongo/db/s/create_collection_coordinator.cpp +++ b/src/mongo/db/s/create_collection_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -59,6 +58,9 @@ #include "mongo/s/grid.h" #include "mongo/s/sharding_feature_flags_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/database_sharding_state.cpp b/src/mongo/db/s/database_sharding_state.cpp index a4c0dff2667..ad18b8b9526 100644 --- a/src/mongo/db/s/database_sharding_state.cpp +++ b/src/mongo/db/s/database_sharding_state.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/s/stale_exception.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/dist_lock_manager.cpp b/src/mongo/db/s/dist_lock_manager.cpp index 96b68bc25b7..ac7d5483f9b 100644 --- a/src/mongo/db/s/dist_lock_manager.cpp +++ b/src/mongo/db/s/dist_lock_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/db/operation_context.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/dist_lock_manager_replset.cpp b/src/mongo/db/s/dist_lock_manager_replset.cpp index 76e4795fc29..b9fbe64162a 100644 --- a/src/mongo/db/s/dist_lock_manager_replset.cpp +++ b/src/mongo/db/s/dist_lock_manager_replset.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/util/time_support.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/drop_collection_coordinator.cpp b/src/mongo/db/s/drop_collection_coordinator.cpp index 0ac0c031d2d..f14fb6305e9 100644 --- a/src/mongo/db/s/drop_collection_coordinator.cpp +++ b/src/mongo/db/s/drop_collection_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/s/drop_collection_coordinator.h" @@ -43,6 +42,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { DropCollectionCoordinator::DropCollectionCoordinator(ShardingDDLCoordinatorService* service, diff --git a/src/mongo/db/s/drop_database_coordinator.cpp b/src/mongo/db/s/drop_database_coordinator.cpp index 35d66821203..815406ec7ad 100644 --- a/src/mongo/db/s/drop_database_coordinator.cpp +++ b/src/mongo/db/s/drop_database_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/s/drop_database_coordinator.h" @@ -47,6 +46,9 @@ #include "mongo/s/request_types/flush_database_cache_updates_gen.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/flush_database_cache_updates_command.cpp b/src/mongo/db/s/flush_database_cache_updates_command.cpp index e56515581f7..e3a857fd57d 100644 --- a/src/mongo/db/s/flush_database_cache_updates_command.cpp +++ b/src/mongo/db/s/flush_database_cache_updates_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/flush_database_cache_updates_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/flush_resharding_state_change_command.cpp b/src/mongo/db/s/flush_resharding_state_change_command.cpp index 9e01244b75d..85f0c42cff0 100644 --- a/src/mongo/db/s/flush_resharding_state_change_command.cpp +++ b/src/mongo/db/s/flush_resharding_state_change_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/flush_resharding_state_change_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { namespace { class FlushReshardingStateChangeCmd final : public TypedCommand<FlushReshardingStateChangeCmd> { diff --git a/src/mongo/db/s/flush_routing_table_cache_updates_command.cpp b/src/mongo/db/s/flush_routing_table_cache_updates_command.cpp index 901a8834517..9ea3f94af97 100644 --- a/src/mongo/db/s/flush_routing_table_cache_updates_command.cpp +++ b/src/mongo/db/s/flush_routing_table_cache_updates_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/flush_routing_table_cache_updates_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/get_database_version_command.cpp b/src/mongo/db/s/get_database_version_command.cpp index 86811740f31..04b48d16dd4 100644 --- a/src/mongo/db/s/get_database_version_command.cpp +++ b/src/mongo/db/s/get_database_version_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/s/request_types/get_database_version_gen.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/get_shard_version_command.cpp b/src/mongo/db/s/get_shard_version_command.cpp index 95c3aa71739..e38db486b20 100644 --- a/src/mongo/db/s/get_shard_version_command.cpp +++ b/src/mongo/db/s/get_shard_version_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/action_set.h" #include "mongo/db/auth/action_type.h" @@ -40,6 +39,9 @@ #include "mongo/s/grid.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/global_index_metrics_test.cpp b/src/mongo/db/s/global_index_metrics_test.cpp index 94befc1e4e2..fcf7471576a 100644 --- a/src/mongo/db/s/global_index_metrics_test.cpp +++ b/src/mongo/db/s/global_index_metrics_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/db/s/sharding_data_transform_metrics_test_fixture.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/global_user_write_block_state.cpp b/src/mongo/db/s/global_user_write_block_state.cpp index a4a1ab933fd..01266b19aa3 100644 --- a/src/mongo/db/s/global_user_write_block_state.cpp +++ b/src/mongo/db/s/global_user_write_block_state.cpp @@ -27,13 +27,15 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" #include "mongo/db/s/global_user_write_block_state.h" #include "mongo/db/write_block_bypass.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/implicit_collection_creation_test.cpp b/src/mongo/db/s/implicit_collection_creation_test.cpp index 02dbe9ed456..f7c501f0a6f 100644 --- a/src/mongo/db/s/implicit_collection_creation_test.cpp +++ b/src/mongo/db/s/implicit_collection_creation_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/db/s/shard_server_test_fixture.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/metadata_manager.cpp b/src/mongo/db/s/metadata_manager.cpp index 6f57d95f93a..df000952835 100644 --- a/src/mongo/db/s/metadata_manager.cpp +++ b/src/mongo/db/s/metadata_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp b/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp index 6016b083429..462baee5069 100644 --- a/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp +++ b/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -65,6 +64,9 @@ #include "mongo/util/str.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp b/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp index 25816b44b5f..d4c7593370c 100644 --- a/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp +++ b/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/db/s/migration_source_manager.h" #include "mongo/db/write_concern.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + /** * This file contains commands, which are specific to the legacy chunk cloner source. */ diff --git a/src/mongo/db/s/migration_coordinator.cpp b/src/mongo/db/s/migration_coordinator.cpp index b6ff4b7abd1..46c8a0d611a 100644 --- a/src/mongo/db/s/migration_coordinator.cpp +++ b/src/mongo/db/s/migration_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kShardingMigration #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/s/sharding_feature_flags_gen.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kShardingMigration + + namespace mongo { MONGO_FAIL_POINT_DEFINE(hangBeforeMakingCommitDecisionDurable); diff --git a/src/mongo/db/s/migration_destination_manager.cpp b/src/mongo/db/s/migration_destination_manager.cpp index 04aaf56bf33..5d6976a3676 100644 --- a/src/mongo/db/s/migration_destination_manager.cpp +++ b/src/mongo/db/s/migration_destination_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kShardingMigration #include "mongo/platform/basic.h" @@ -87,6 +86,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kShardingMigration + + namespace mongo { namespace { diff --git a/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp b/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp index 8233113e409..a58e08d4a14 100644 --- a/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp +++ b/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/action_set.h" #include "mongo/db/auth/action_type.h" @@ -48,6 +47,9 @@ #include "mongo/s/request_types/migration_secondary_throttle_options.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/migration_source_manager.cpp b/src/mongo/db/s/migration_source_manager.cpp index 01a77584fed..1a6909e629f 100644 --- a/src/mongo/db/s/migration_source_manager.cpp +++ b/src/mongo/db/s/migration_source_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kShardingMigration #include "mongo/db/s/migration_source_manager.h" @@ -68,6 +67,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kShardingMigration + + namespace mongo { namespace { diff --git a/src/mongo/db/s/migration_util.cpp b/src/mongo/db/s/migration_util.cpp index 805520e2821..e05eb92c0c8 100644 --- a/src/mongo/db/s/migration_util.cpp +++ b/src/mongo/db/s/migration_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kShardingMigration #include "mongo/platform/basic.h" @@ -78,6 +77,9 @@ #include "mongo/util/exit.h" #include "mongo/util/future_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kShardingMigration + + namespace mongo { namespace migrationutil { namespace { diff --git a/src/mongo/db/s/move_primary_coordinator.cpp b/src/mongo/db/s/move_primary_coordinator.cpp index 1a5966655eb..c7fb0d9e44d 100644 --- a/src/mongo/db/s/move_primary_coordinator.cpp +++ b/src/mongo/db/s/move_primary_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/s/grid.h" #include "mongo/s/shard_id.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { MovePrimaryCoordinator::MovePrimaryCoordinator(ShardingDDLCoordinatorService* service, diff --git a/src/mongo/db/s/move_primary_source_manager.cpp b/src/mongo/db/s/move_primary_source_manager.cpp index dea310c8430..b4382f21e0f 100644 --- a/src/mongo/db/s/move_primary_source_manager.cpp +++ b/src/mongo/db/s/move_primary_source_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/util/exit.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { MONGO_FAIL_POINT_DEFINE(hangInCloneStage); diff --git a/src/mongo/db/s/move_timing_helper.cpp b/src/mongo/db/s/move_timing_helper.cpp index f62adc83956..1494da2882e 100644 --- a/src/mongo/db/s/move_timing_helper.cpp +++ b/src/mongo/db/s/move_timing_helper.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/catalog/sharding_catalog_client.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { MoveTimingHelper::MoveTimingHelper(OperationContext* opCtx, diff --git a/src/mongo/db/s/op_observer_sharding_impl.cpp b/src/mongo/db/s/op_observer_sharding_impl.cpp index ab8ce8ca5e8..2432902effd 100644 --- a/src/mongo/db/s/op_observer_sharding_impl.cpp +++ b/src/mongo/db/s/op_observer_sharding_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/db/s/sharding_write_router.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/periodic_balancer_config_refresher.cpp b/src/mongo/db/s/periodic_balancer_config_refresher.cpp index d5fbc23bc42..089f721350c 100644 --- a/src/mongo/db/s/periodic_balancer_config_refresher.cpp +++ b/src/mongo/db/s/periodic_balancer_config_refresher.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/s/balancer_configuration.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/periodic_sharded_index_consistency_checker.cpp b/src/mongo/db/s/periodic_sharded_index_consistency_checker.cpp index 6145ddc0079..b5378f38e02 100644 --- a/src/mongo/db/s/periodic_sharded_index_consistency_checker.cpp +++ b/src/mongo/db/s/periodic_sharded_index_consistency_checker.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/s/query/cluster_aggregate.h" #include "mongo/s/stale_shard_version_helpers.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/range_deletion_util.cpp b/src/mongo/db/s/range_deletion_util.cpp index 76fc91e5697..92d388f8748 100644 --- a/src/mongo/db/s/range_deletion_util.cpp +++ b/src/mongo/db/s/range_deletion_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kShardingRangeDeleter #include "mongo/platform/basic.h" @@ -66,6 +65,9 @@ #include "mongo/util/cancellation.h" #include "mongo/util/future_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kShardingRangeDeleter + + namespace mongo { namespace { diff --git a/src/mongo/db/s/recoverable_critical_section_service.cpp b/src/mongo/db/s/recoverable_critical_section_service.cpp index 39406025140..0ea15b6e594 100644 --- a/src/mongo/db/s/recoverable_critical_section_service.cpp +++ b/src/mongo/db/s/recoverable_critical_section_service.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include <set> @@ -46,6 +45,9 @@ #include "mongo/s/write_ops/batched_command_request.h" #include "mongo/s/write_ops/batched_command_response.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace recoverable_critical_section_util { diff --git a/src/mongo/db/s/refine_collection_shard_key_coordinator.cpp b/src/mongo/db/s/refine_collection_shard_key_coordinator.cpp index 48977ca7380..0aaeaeddd52 100644 --- a/src/mongo/db/s/refine_collection_shard_key_coordinator.cpp +++ b/src/mongo/db/s/refine_collection_shard_key_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/s/refine_collection_shard_key_coordinator.h" @@ -44,6 +43,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/rename_collection_coordinator.cpp b/src/mongo/db/s/rename_collection_coordinator.cpp index 47db3dc63d7..29326512401 100644 --- a/src/mongo/db/s/rename_collection_coordinator.cpp +++ b/src/mongo/db/s/rename_collection_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -51,6 +50,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/rename_collection_participant_service.cpp b/src/mongo/db/s/rename_collection_participant_service.cpp index bf2766e668d..6bd202be2c6 100644 --- a/src/mongo/db/s/rename_collection_participant_service.cpp +++ b/src/mongo/db/s/rename_collection_participant_service.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/s/grid.h" #include "mongo/util/future_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/reshard_collection_coordinator.cpp b/src/mongo/db/s/reshard_collection_coordinator.cpp index bfb95c4c16c..67b86013c70 100644 --- a/src/mongo/db/s/reshard_collection_coordinator.cpp +++ b/src/mongo/db/s/reshard_collection_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -40,6 +39,8 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/reshard_collection_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + namespace mongo { diff --git a/src/mongo/db/s/resharding/document_source_resharding_iterate_transaction.cpp b/src/mongo/db/s/resharding/document_source_resharding_iterate_transaction.cpp index 9d412147b7f..6513d1634dc 100644 --- a/src/mongo/db/s/resharding/document_source_resharding_iterate_transaction.cpp +++ b/src/mongo/db/s/resharding/document_source_resharding_iterate_transaction.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/db/commands/txn_cmds_gen.h" #include "mongo/db/transaction_history_iterator.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { // Generates the _id field for the resharding event. For an event within a transaction, this will be diff --git a/src/mongo/db/s/resharding/document_source_resharding_ownership_match.cpp b/src/mongo/db/s/resharding/document_source_resharding_ownership_match.cpp index f8a186e3bcd..aaeb6180654 100644 --- a/src/mongo/db/s/resharding/document_source_resharding_ownership_match.cpp +++ b/src/mongo/db/s/resharding/document_source_resharding_ownership_match.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/s/grid.h" #include "mongo/s/resharding/common_types_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { REGISTER_INTERNAL_DOCUMENT_SOURCE(_internalReshardingOwnershipMatch, diff --git a/src/mongo/db/s/resharding/resharding_collection_cloner.cpp b/src/mongo/db/s/resharding/resharding_collection_cloner.cpp index faf0cf0c991..f447f9dd1b1 100644 --- a/src/mongo/db/s/resharding/resharding_collection_cloner.cpp +++ b/src/mongo/db/s/resharding/resharding_collection_cloner.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/platform/basic.h" @@ -63,6 +62,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_collection_cloner_test.cpp b/src/mongo/db/s/resharding/resharding_collection_cloner_test.cpp index 50f54943fe1..62330924df8 100644 --- a/src/mongo/db/s/resharding/resharding_collection_cloner_test.cpp +++ b/src/mongo/db/s/resharding/resharding_collection_cloner_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/db/service_context_test_fixture.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_collection_test.cpp b/src/mongo/db/s/resharding/resharding_collection_test.cpp index 71e3c780990..b44cac4d093 100644 --- a/src/mongo/db/s/resharding/resharding_collection_test.cpp +++ b/src/mongo/db/s/resharding/resharding_collection_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + using namespace fmt::literals; namespace mongo { diff --git a/src/mongo/db/s/resharding/resharding_coordinator_commit_monitor.cpp b/src/mongo/db/s/resharding/resharding_coordinator_commit_monitor.cpp index a898267e8a6..314812f7158 100644 --- a/src/mongo/db/s/resharding/resharding_coordinator_commit_monitor.cpp +++ b/src/mongo/db/s/resharding/resharding_coordinator_commit_monitor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include <boost/optional.hpp> #include <fmt/format.h> @@ -48,6 +47,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/testing_proctor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + using namespace fmt::literals; namespace mongo { diff --git a/src/mongo/db/s/resharding/resharding_coordinator_commit_monitor_test.cpp b/src/mongo/db/s/resharding/resharding_coordinator_commit_monitor_test.cpp index 831c137f340..cc9431145ae 100644 --- a/src/mongo/db/s/resharding/resharding_coordinator_commit_monitor_test.cpp +++ b/src/mongo/db/s/resharding/resharding_coordinator_commit_monitor_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include <algorithm> #include <boost/optional.hpp> @@ -52,6 +51,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/functional.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace resharding { namespace { diff --git a/src/mongo/db/s/resharding/resharding_coordinator_observer.cpp b/src/mongo/db/s/resharding/resharding_coordinator_observer.cpp index 70530dfb83b..5f78cac592c 100644 --- a/src/mongo/db/s/resharding/resharding_coordinator_observer.cpp +++ b/src/mongo/db/s/resharding/resharding_coordinator_observer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/s/catalog/type_chunk.h" #include "mongo/s/shard_id.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_coordinator_observer_test.cpp b/src/mongo/db/s/resharding/resharding_coordinator_observer_test.cpp index 1ca323c7a31..0f3803ab04e 100644 --- a/src/mongo/db/s/resharding/resharding_coordinator_observer_test.cpp +++ b/src/mongo/db/s/resharding/resharding_coordinator_observer_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/s/shard_id.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_coordinator_service.cpp b/src/mongo/db/s/resharding/resharding_coordinator_service.cpp index 5546dc9b46a..0a56020206f 100644 --- a/src/mongo/db/s/resharding/resharding_coordinator_service.cpp +++ b/src/mongo/db/s/resharding/resharding_coordinator_service.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/platform/basic.h" @@ -79,6 +78,9 @@ #include "mongo/util/string_map.h" #include "mongo/util/uuid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_coordinator_service_test.cpp b/src/mongo/db/s/resharding/resharding_coordinator_service_test.cpp index 5963b2512d5..f890ca53ca2 100644 --- a/src/mongo/db/s/resharding/resharding_coordinator_service_test.cpp +++ b/src/mongo/db/s/resharding/resharding_coordinator_service_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -58,6 +57,9 @@ #include "mongo/util/clock_source_mock.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_coordinator_test.cpp b/src/mongo/db/s/resharding/resharding_coordinator_test.cpp index 97a8a18ae80..6d69dd99f28 100644 --- a/src/mongo/db/s/resharding/resharding_coordinator_test.cpp +++ b/src/mongo/db/s/resharding/resharding_coordinator_test.cpp @@ -28,7 +28,6 @@ */ #include "mongo/db/s/resharding/coordinator_document_gen.h" -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/clock_source_mock.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_data_replication.cpp b/src/mongo/db/s/resharding/resharding_data_replication.cpp index 0b7a6c9efb9..1b2bd3c2fa4 100644 --- a/src/mongo/db/s/resharding/resharding_data_replication.cpp +++ b/src/mongo/db/s/resharding/resharding_data_replication.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/util/concurrency/thread_pool.h" #include "mongo/util/future_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_data_replication_test.cpp b/src/mongo/db/s/resharding/resharding_data_replication_test.cpp index 8e59ca48219..f71ce9f0356 100644 --- a/src/mongo/db/s/resharding/resharding_data_replication_test.cpp +++ b/src/mongo/db/s/resharding/resharding_data_replication_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/s/chunk_manager.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_destined_recipient_test.cpp b/src/mongo/db/s/resharding/resharding_destined_recipient_test.cpp index fb3925ea159..ed5d6b1cf42 100644 --- a/src/mongo/db/s/resharding/resharding_destined_recipient_test.cpp +++ b/src/mongo/db/s/resharding/resharding_destined_recipient_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include "mongo/s/shard_id.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_donor_oplog_iterator.cpp b/src/mongo/db/s/resharding/resharding_donor_oplog_iterator.cpp index ae033561d73..5213b170753 100644 --- a/src/mongo/db/s/resharding/resharding_donor_oplog_iterator.cpp +++ b/src/mongo/db/s/resharding/resharding_donor_oplog_iterator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/platform/basic.h" @@ -53,6 +52,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { using namespace fmt::literals; diff --git a/src/mongo/db/s/resharding/resharding_donor_oplog_iterator_test.cpp b/src/mongo/db/s/resharding/resharding_donor_oplog_iterator_test.cpp index 4c0bbf9907f..26b7646283f 100644 --- a/src/mongo/db/s/resharding/resharding_donor_oplog_iterator_test.cpp +++ b/src/mongo/db/s/resharding/resharding_donor_oplog_iterator_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/unittest/death_test.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_donor_recipient_common.cpp b/src/mongo/db/s/resharding/resharding_donor_recipient_common.cpp index 27f3efeb1f2..60a094f8e5e 100644 --- a/src/mongo/db/s/resharding/resharding_donor_recipient_common.cpp +++ b/src/mongo/db/s/resharding/resharding_donor_recipient_common.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/s/grid.h" #include "mongo/stdx/unordered_set.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { namespace resharding { diff --git a/src/mongo/db/s/resharding/resharding_donor_service.cpp b/src/mongo/db/s/resharding/resharding_donor_service.cpp index 30d284cbc12..34c88cfb757 100644 --- a/src/mongo/db/s/resharding/resharding_donor_service.cpp +++ b/src/mongo/db/s/resharding/resharding_donor_service.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/db/s/resharding/resharding_donor_service.h" @@ -63,6 +62,9 @@ #include "mongo/s/grid.h" #include "mongo/util/future_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { MONGO_FAIL_POINT_DEFINE(reshardingDonorFailsAfterTransitionToDonatingOplogEntries); diff --git a/src/mongo/db/s/resharding/resharding_donor_service_test.cpp b/src/mongo/db/s/resharding/resharding_donor_service_test.cpp index 3ed622bdee1..1a9b204f4b5 100644 --- a/src/mongo/db/s/resharding/resharding_donor_service_test.cpp +++ b/src/mongo/db/s/resharding/resharding_donor_service_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -57,6 +56,9 @@ #include "mongo/unittest/death_test.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_manual_cleanup.cpp b/src/mongo/db/s/resharding/resharding_manual_cleanup.cpp index ae24ef97554..e274c6bbf7c 100644 --- a/src/mongo/db/s/resharding/resharding_manual_cleanup.cpp +++ b/src/mongo/db/s/resharding/resharding_manual_cleanup.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/db/s/resharding/resharding_manual_cleanup.h" @@ -39,6 +38,9 @@ #include "mongo/s/request_types/cleanup_reshard_collection_gen.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_metrics.cpp b/src/mongo/db/s/resharding/resharding_metrics.cpp index fa5fea13683..6a11be7e88f 100644 --- a/src/mongo/db/s/resharding/resharding_metrics.cpp +++ b/src/mongo/db/s/resharding/resharding_metrics.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include <algorithm> #include <memory> @@ -40,6 +39,9 @@ #include "mongo/util/duration.h" #include "mongo/util/histogram.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_metrics_helpers.cpp b/src/mongo/db/s/resharding/resharding_metrics_helpers.cpp index 34fd2446df4..786bcdaa9ab 100644 --- a/src/mongo/db/s/resharding/resharding_metrics_helpers.cpp +++ b/src/mongo/db/s/resharding/resharding_metrics_helpers.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/db/s/resharding/resharding_metrics_helpers.h" #include "mongo/db/catalog_raii.h" @@ -35,6 +34,9 @@ #include "mongo/db/s/resharding/resharding_donor_recipient_common.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { namespace resharding_metrics { diff --git a/src/mongo/db/s/resharding/resharding_metrics_new_test.cpp b/src/mongo/db/s/resharding/resharding_metrics_new_test.cpp index 0e1402541b4..23aae46cfc7 100644 --- a/src/mongo/db/s/resharding/resharding_metrics_new_test.cpp +++ b/src/mongo/db/s/resharding/resharding_metrics_new_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/db/s/sharding_data_transform_metrics_test_fixture.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_metrics_test.cpp b/src/mongo/db/s/resharding/resharding_metrics_test.cpp index 4546f227ba3..978963eb555 100644 --- a/src/mongo/db/s/resharding/resharding_metrics_test.cpp +++ b/src/mongo/db/s/resharding/resharding_metrics_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include <fmt/format.h> @@ -43,6 +42,9 @@ #include "mongo/util/histogram.h" #include "mongo/util/uuid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_op_observer.cpp b/src/mongo/db/s/resharding/resharding_op_observer.cpp index ba1f768f552..9fbfa40bf55 100644 --- a/src/mongo/db/s/resharding/resharding_op_observer.cpp +++ b/src/mongo/db/s/resharding/resharding_op_observer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/db/s/resharding/resharding_coordinator_service.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_oplog_application.cpp b/src/mongo/db/s/resharding/resharding_oplog_application.cpp index 2be5f8f2b58..6b1a1b1882f 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_application.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_application.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/sharding_feature_flags_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { namespace { Date_t getDeadline(OperationContext* opCtx) { diff --git a/src/mongo/db/s/resharding/resharding_oplog_applier.cpp b/src/mongo/db/s/resharding/resharding_oplog_applier.cpp index 99d4d50bb73..3fafff24f67 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_applier.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_applier.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/uuid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_oplog_applier_metrics_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_applier_metrics_test.cpp index 99844f02862..44ea5efb842 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_applier_metrics_test.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_applier_metrics_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/db/s/sharding_data_transform_metrics_test_fixture.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_oplog_applier_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_applier_test.cpp index 9b2d7ab5ca9..e6e80179440 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_applier_test.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_applier_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -64,6 +63,9 @@ #include "mongo/util/str.h" #include "mongo/util/uuid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_oplog_batch_applier.cpp b/src/mongo/db/s/resharding/resharding_oplog_batch_applier.cpp index e675dca01a8..44596eb41c4 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_batch_applier.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_batch_applier.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/db/s/resharding/resharding_oplog_session_application.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { ReshardingOplogBatchApplier::ReshardingOplogBatchApplier( diff --git a/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp index c1d471f0837..7e4c2b6c22f 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -64,6 +63,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/concurrency/thread_pool.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_oplog_crud_application_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_crud_application_test.cpp index 4f5bf2fe69f..96282217dad 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_crud_application_test.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_crud_application_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -58,6 +57,9 @@ #include "mongo/s/chunk_manager.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_oplog_fetcher.cpp b/src/mongo/db/s/resharding/resharding_oplog_fetcher.cpp index 2aba0d6bc1a..ef0cb4a40f4 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_fetcher.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_fetcher.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/platform/basic.h" @@ -55,6 +54,9 @@ #include "mongo/s/grid.h" #include "mongo/stdx/mutex.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { namespace { boost::intrusive_ptr<ExpressionContext> _makeExpressionContext(OperationContext* opCtx) { diff --git a/src/mongo/db/s/resharding/resharding_oplog_fetcher_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_fetcher_test.cpp index 8cafdb83a9f..118778f0b90 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_fetcher_test.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_fetcher_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -59,6 +58,9 @@ #include "mongo/unittest/death_test.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_oplog_session_application_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_session_application_test.cpp index c08e3e34795..4ace264783d 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_session_application_test.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_session_application_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/unittest/death_test.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_recipient_service.cpp b/src/mongo/db/s/resharding/resharding_recipient_service.cpp index 78165f87b41..db4b9f29067 100644 --- a/src/mongo/db/s/resharding/resharding_recipient_service.cpp +++ b/src/mongo/db/s/resharding/resharding_recipient_service.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/db/s/resharding/resharding_recipient_service.h" @@ -69,6 +68,9 @@ #include "mongo/s/stale_shard_version_helpers.h" #include "mongo/util/future_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { MONGO_FAIL_POINT_DEFINE(removeRecipientDocFailpoint); diff --git a/src/mongo/db/s/resharding/resharding_recipient_service_external_state.cpp b/src/mongo/db/s/resharding/resharding_recipient_service_external_state.cpp index 2dc584953d6..3e929815454 100644 --- a/src/mongo/db/s/resharding/resharding_recipient_service_external_state.cpp +++ b/src/mongo/db/s/resharding/resharding_recipient_service_external_state.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/db/s/resharding/resharding_recipient_service_external_state.h" @@ -41,6 +40,9 @@ #include "mongo/s/resharding/common_types_gen.h" #include "mongo/s/stale_shard_version_helpers.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_recipient_service_external_state_test.cpp b/src/mongo/db/s/resharding/resharding_recipient_service_external_state_test.cpp index b5fbeb01f99..4210c0f81ed 100644 --- a/src/mongo/db/s/resharding/resharding_recipient_service_external_state_test.cpp +++ b/src/mongo/db/s/resharding/resharding_recipient_service_external_state_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/s/database_version.h" #include "mongo/s/stale_exception.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_recipient_service_test.cpp b/src/mongo/db/s/resharding/resharding_recipient_service_test.cpp index 6bddf3386c2..29225a87047 100644 --- a/src/mongo/db/s/resharding/resharding_recipient_service_test.cpp +++ b/src/mongo/db/s/resharding/resharding_recipient_service_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include "mongo/unittest/death_test.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_service_test_helpers.cpp b/src/mongo/db/s/resharding/resharding_service_test_helpers.cpp index 56dad991096..b46f2a04178 100644 --- a/src/mongo/db/s/resharding/resharding_service_test_helpers.cpp +++ b/src/mongo/db/s/resharding/resharding_service_test_helpers.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/db/s/resharding/resharding_donor_service.h" #include "mongo/db/s/resharding/resharding_recipient_service.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace resharding_service_test_helpers { diff --git a/src/mongo/db/s/resharding/resharding_txn_cloner.cpp b/src/mongo/db/s/resharding/resharding_txn_cloner.cpp index b1f1043463d..b2ff55dece2 100644 --- a/src/mongo/db/s/resharding/resharding_txn_cloner.cpp +++ b/src/mongo/db/s/resharding/resharding_txn_cloner.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/platform/basic.h" @@ -63,6 +62,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { ReshardingTxnCloner::ReshardingTxnCloner(ReshardingSourceId sourceId, Timestamp fetchTimestamp) diff --git a/src/mongo/db/s/resharding/resharding_txn_cloner_test.cpp b/src/mongo/db/s/resharding/resharding_txn_cloner_test.cpp index 144cc0a7def..78e6badcfc1 100644 --- a/src/mongo/db/s/resharding/resharding_txn_cloner_test.cpp +++ b/src/mongo/db/s/resharding/resharding_txn_cloner_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -62,6 +61,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/concurrency/thread_pool.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_util.cpp b/src/mongo/db/s/resharding/resharding_util.cpp index ba256ae2a1e..ce51b7d25a1 100644 --- a/src/mongo/db/s/resharding/resharding_util.cpp +++ b/src/mongo/db/s/resharding/resharding_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding #include "mongo/platform/basic.h" @@ -61,6 +60,9 @@ #include "mongo/s/shard_invalidated_for_targeting_exception.h" #include "mongo/s/shard_key_pattern.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kResharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding/resharding_util_test.cpp b/src/mongo/db/s/resharding/resharding_util_test.cpp index 6404975d2d5..5fd40fd86b7 100644 --- a/src/mongo/db/s/resharding/resharding_util_test.cpp +++ b/src/mongo/db/s/resharding/resharding_util_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/s/shard_id.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/resharding_test_commands.cpp b/src/mongo/db/s/resharding_test_commands.cpp index 75b8c1e7cf8..ad34b6716ba 100644 --- a/src/mongo/db/s/resharding_test_commands.cpp +++ b/src/mongo/db/s/resharding_test_commands.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/rpc/metadata/egress_metadata_hook_list.h" #include "mongo/util/concurrency/thread_pool.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/s/scoped_operation_completion_sharding_actions.cpp b/src/mongo/db/s/scoped_operation_completion_sharding_actions.cpp index 7e3d89d58f0..ab0bb3ae11f 100644 --- a/src/mongo/db/s/scoped_operation_completion_sharding_actions.cpp +++ b/src/mongo/db/s/scoped_operation_completion_sharding_actions.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/s/scoped_operation_completion_sharding_actions.h" @@ -39,6 +38,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/stale_exception.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/session_catalog_migration_destination.cpp b/src/mongo/db/s/session_catalog_migration_destination.cpp index ca5aae86f6d..c4e039eca1d 100644 --- a/src/mongo/db/s/session_catalog_migration_destination.cpp +++ b/src/mongo/db/s/session_catalog_migration_destination.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include "mongo/s/grid.h" #include "mongo/s/shard_id.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/sessions_collection_config_server.cpp b/src/mongo/db/s/sessions_collection_config_server.cpp index 48374167b41..da0f3d679a9 100644 --- a/src/mongo/db/s/sessions_collection_config_server.cpp +++ b/src/mongo/db/s/sessions_collection_config_server.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/db/s/sessions_collection_config_server.h" @@ -39,6 +38,9 @@ #include "mongo/s/request_types/sharded_ddl_commands_gen.h" #include "mongo/s/stale_shard_version_helpers.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { void SessionsCollectionConfigServer::_shardCollectionIfNeeded(OperationContext* opCtx) { diff --git a/src/mongo/db/s/set_allow_migrations_coordinator.cpp b/src/mongo/db/s/set_allow_migrations_coordinator.cpp index 1cf2edac166..3395aa7f465 100644 --- a/src/mongo/db/s/set_allow_migrations_coordinator.cpp +++ b/src/mongo/db/s/set_allow_migrations_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/s/set_allow_migrations_coordinator.h" @@ -36,6 +35,9 @@ #include "mongo/s/catalog/type_collection.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { bool isCollectionSharded(OperationContext* opCtx, const NamespaceString& nss) { diff --git a/src/mongo/db/s/set_shard_version_command.cpp b/src/mongo/db/s/set_shard_version_command.cpp index efc2d36aa63..006850f9e1c 100644 --- a/src/mongo/db/s/set_shard_version_command.cpp +++ b/src/mongo/db/s/set_shard_version_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -51,6 +50,9 @@ #include "mongo/s/request_types/set_shard_version_request.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shard_filtering_metadata_refresh.cpp b/src/mongo/db/s/shard_filtering_metadata_refresh.cpp index 0a7cecfe632..4c7df87ac58 100644 --- a/src/mongo/db/s/shard_filtering_metadata_refresh.cpp +++ b/src/mongo/db/s/shard_filtering_metadata_refresh.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/s/shard_filtering_metadata_refresh.h" @@ -48,6 +47,9 @@ #include "mongo/s/grid.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shard_key_index_util.cpp b/src/mongo/db/s/shard_key_index_util.cpp index 5269e6d87fb..4097c9f236f 100644 --- a/src/mongo/db/s/shard_key_index_util.cpp +++ b/src/mongo/db/s/shard_key_index_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/db/catalog/index_catalog.h" #include "mongo/db/s/shard_key_index_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shard_local.cpp b/src/mongo/db/s/shard_local.cpp index eb4b1aba4ff..5756c7f928e 100644 --- a/src/mongo/db/s/shard_local.cpp +++ b/src/mongo/db/s/shard_local.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { ShardLocal::ShardLocal(const ShardId& id) : Shard(id) { diff --git a/src/mongo/db/s/shard_metadata_util.cpp b/src/mongo/db/s/shard_metadata_util.cpp index 6472807afd0..515fca1e04f 100644 --- a/src/mongo/db/s/shard_metadata_util.cpp +++ b/src/mongo/db/s/shard_metadata_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/s/chunk_version.h" #include "mongo/s/write_ops/batched_command_response.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace shardmetadatautil { namespace { diff --git a/src/mongo/db/s/shard_server_catalog_cache_loader.cpp b/src/mongo/db/s/shard_server_catalog_cache_loader.cpp index 4ce708378fe..9ba06b3b8ed 100644 --- a/src/mongo/db/s/shard_server_catalog_cache_loader.cpp +++ b/src/mongo/db/s/shard_server_catalog_cache_loader.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #define LOGV2_FOR_CATALOG_REFRESH(ID, DLEVEL, MESSAGE, ...) \ LOGV2_DEBUG_OPTIONS( \ @@ -56,6 +55,9 @@ #include "mongo/s/grid.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { using namespace shardmetadatautil; diff --git a/src/mongo/db/s/shard_server_op_observer.cpp b/src/mongo/db/s/shard_server_op_observer.cpp index 228ef5ffbb9..b21822ab82b 100644 --- a/src/mongo/db/s/shard_server_op_observer.cpp +++ b/src/mongo/db/s/shard_server_op_observer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -60,6 +59,9 @@ #include "mongo/s/grid.h" #include "mongo/s/sharding_feature_flags_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/sharding_data_transform_cumulative_metrics_test.cpp b/src/mongo/db/s/sharding_data_transform_cumulative_metrics_test.cpp index c96d3481b41..aadacd3aa14 100644 --- a/src/mongo/db/s/sharding_data_transform_cumulative_metrics_test.cpp +++ b/src/mongo/db/s/sharding_data_transform_cumulative_metrics_test.cpp @@ -41,6 +41,7 @@ #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + namespace mongo { namespace { diff --git a/src/mongo/db/s/sharding_data_transform_instance_metrics_test.cpp b/src/mongo/db/s/sharding_data_transform_instance_metrics_test.cpp index 6d536768955..7527698688d 100644 --- a/src/mongo/db/s/sharding_data_transform_instance_metrics_test.cpp +++ b/src/mongo/db/s/sharding_data_transform_instance_metrics_test.cpp @@ -38,6 +38,7 @@ #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + namespace mongo { namespace { diff --git a/src/mongo/db/s/sharding_ddl_coordinator.cpp b/src/mongo/db/s/sharding_ddl_coordinator.cpp index 481a9868aa5..7299b5ac937 100644 --- a/src/mongo/db/s/sharding_ddl_coordinator.cpp +++ b/src/mongo/db/s/sharding_ddl_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/util/future_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { MONGO_FAIL_POINT_DEFINE(hangBeforeRunningCoordinatorInstance); diff --git a/src/mongo/db/s/sharding_ddl_coordinator_service.cpp b/src/mongo/db/s/sharding_ddl_coordinator_service.cpp index 5fb5a6fb6ac..b3d59d1caa6 100644 --- a/src/mongo/db/s/sharding_ddl_coordinator_service.cpp +++ b/src/mongo/db/s/sharding_ddl_coordinator_service.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include "mongo/db/s/sharding_ddl_coordinator.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/sharding_ddl_util.cpp b/src/mongo/db/s/sharding_ddl_util.cpp index d516fd5e668..8b5c2113adf 100644 --- a/src/mongo/db/s/sharding_ddl_util.cpp +++ b/src/mongo/db/s/sharding_ddl_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/s/sharding_ddl_util.h" @@ -53,6 +52,9 @@ #include "mongo/s/request_types/set_allow_migrations_gen.h" #include "mongo/s/write_ops/batch_write_exec.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace sharding_ddl_util { namespace { diff --git a/src/mongo/db/s/sharding_ddl_util_test.cpp b/src/mongo/db/s/sharding_ddl_util_test.cpp index 044e11ccda9..2fc8957a799 100644 --- a/src/mongo/db/s/sharding_ddl_util_test.cpp +++ b/src/mongo/db/s/sharding_ddl_util_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/sharding_initialization_mongod.cpp b/src/mongo/db/s/sharding_initialization_mongod.cpp index 6b0cba8ed9b..1181fa7022b 100644 --- a/src/mongo/db/s/sharding_initialization_mongod.cpp +++ b/src/mongo/db/s/sharding_initialization_mongod.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -66,6 +65,9 @@ #include "mongo/s/config_server_catalog_cache_loader.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { // Failpoint for disabling updateShardIdentityConfigString calls on signaled RS nodes. diff --git a/src/mongo/db/s/sharding_logging.cpp b/src/mongo/db/s/sharding_logging.cpp index dfa7626e29f..29fbc6cc524 100644 --- a/src/mongo/db/s/sharding_logging.cpp +++ b/src/mongo/db/s/sharding_logging.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/s/catalog/type_changelog.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/sharding_logging_test.cpp b/src/mongo/db/s/sharding_logging_test.cpp index a5622798baa..039e99b3a0b 100644 --- a/src/mongo/db/s/sharding_logging_test.cpp +++ b/src/mongo/db/s/sharding_logging_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/util/str.h" #include "mongo/util/text.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/sharding_state.cpp b/src/mongo/db/s/sharding_state.cpp index 9bf722313e5..1248948bbac 100644 --- a/src/mongo/db/s/sharding_state.cpp +++ b/src/mongo/db/s/sharding_state.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/db/server_options.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/sharding_state_command.cpp b/src/mongo/db/s/sharding_state_command.cpp index 948ba614c80..1af025a2ecc 100644 --- a/src/mongo/db/s/sharding_state_command.cpp +++ b/src/mongo/db/s/sharding_state_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/db/s/sharding_state.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/sharding_state_recovery.cpp b/src/mongo/db/s/sharding_state_recovery.cpp index a47f086a997..bdfbc3505c8 100644 --- a/src/mongo/db/s/sharding_state_recovery.cpp +++ b/src/mongo/db/s/sharding_state_recovery.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/client/shard_registry.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/sharding_util.cpp b/src/mongo/db/s/sharding_util.cpp index 002d65d22dc..6e66978dcd2 100644 --- a/src/mongo/db/s/sharding_util.cpp +++ b/src/mongo/db/s/sharding_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/s/catalog/type_collection.h" #include "mongo/s/request_types/flush_routing_table_cache_updates_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace sharding_util { diff --git a/src/mongo/db/s/sharding_util_refresh_test.cpp b/src/mongo/db/s/sharding_util_refresh_test.cpp index 90850ecc206..81d96fca8cd 100644 --- a/src/mongo/db/s/sharding_util_refresh_test.cpp +++ b/src/mongo/db/s/sharding_util_refresh_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/s/catalog/type_shard.h" #include "mongo/s/shard_id.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_abort_reshard_collection_command.cpp b/src/mongo/db/s/shardsvr_abort_reshard_collection_command.cpp index aa319814395..239f5b15cc9 100644 --- a/src/mongo/db/s/shardsvr_abort_reshard_collection_command.cpp +++ b/src/mongo/db/s/shardsvr_abort_reshard_collection_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/s/request_types/abort_reshard_collection_gen.h" #include "mongo/s/resharding/resharding_feature_flag_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_cleanup_reshard_collection_command.cpp b/src/mongo/db/s/shardsvr_cleanup_reshard_collection_command.cpp index b58a8ca9915..74754350096 100644 --- a/src/mongo/db/s/shardsvr_cleanup_reshard_collection_command.cpp +++ b/src/mongo/db/s/shardsvr_cleanup_reshard_collection_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/s/request_types/cleanup_reshard_collection_gen.h" #include "mongo/s/resharding/resharding_feature_flag_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_collmod_command.cpp b/src/mongo/db/s/shardsvr_collmod_command.cpp index f1736ec156c..26065c6aa72 100644 --- a/src/mongo/db/s/shardsvr_collmod_command.cpp +++ b/src/mongo/db/s/shardsvr_collmod_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/authorization_checks.h" #include "mongo/db/auth/authorization_session.h" @@ -48,6 +47,9 @@ #include "mongo/s/grid.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_collmod_participant_command.cpp b/src/mongo/db/s/shardsvr_collmod_participant_command.cpp index 7845a705185..1ffbdb06954 100644 --- a/src/mongo/db/s/shardsvr_collmod_participant_command.cpp +++ b/src/mongo/db/s/shardsvr_collmod_participant_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/authorization_session.h" #include "mongo/db/catalog_raii.h" @@ -44,6 +43,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/catalog/sharding_catalog_client.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_commit_reshard_collection_command.cpp b/src/mongo/db/s/shardsvr_commit_reshard_collection_command.cpp index 5cf90ea6441..77470e73e69 100644 --- a/src/mongo/db/s/shardsvr_commit_reshard_collection_command.cpp +++ b/src/mongo/db/s/shardsvr_commit_reshard_collection_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/s/request_types/commit_reshard_collection_gen.h" #include "mongo/s/resharding/resharding_feature_flag_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_compact_structured_encryption_data_command.cpp b/src/mongo/db/s/shardsvr_compact_structured_encryption_data_command.cpp index c4fd520e805..e36a2a4003c 100644 --- a/src/mongo/db/s/shardsvr_compact_structured_encryption_data_command.cpp +++ b/src/mongo/db/s/shardsvr_compact_structured_encryption_data_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/db/auth/authorization_session.h" #include "mongo/db/catalog/collection_catalog.h" @@ -41,6 +40,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/cluster_commands_helpers.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_create_collection_command.cpp b/src/mongo/db/s/shardsvr_create_collection_command.cpp index 1bcff6e6dbc..21657f758eb 100644 --- a/src/mongo/db/s/shardsvr_create_collection_command.cpp +++ b/src/mongo/db/s/shardsvr_create_collection_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/authorization_session.h" #include "mongo/db/catalog/collection_catalog.h" @@ -40,6 +39,9 @@ #include "mongo/db/timeseries/timeseries_options.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_create_collection_participant_command.cpp b/src/mongo/db/s/shardsvr_create_collection_participant_command.cpp index 4ef72fd2f72..6f802b63811 100644 --- a/src/mongo/db/s/shardsvr_create_collection_participant_command.cpp +++ b/src/mongo/db/s/shardsvr_create_collection_participant_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/db/transaction_participant.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_drop_collection_command.cpp b/src/mongo/db/s/shardsvr_drop_collection_command.cpp index cdbdbcecd70..55d9d096121 100644 --- a/src/mongo/db/s/shardsvr_drop_collection_command.cpp +++ b/src/mongo/db/s/shardsvr_drop_collection_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/authorization_session.h" #include "mongo/db/commands.h" @@ -40,6 +39,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_drop_collection_if_uuid_not_matching_command.cpp b/src/mongo/db/s/shardsvr_drop_collection_if_uuid_not_matching_command.cpp index 75920fd592e..bd0e9a9a4aa 100644 --- a/src/mongo/db/s/shardsvr_drop_collection_if_uuid_not_matching_command.cpp +++ b/src/mongo/db/s/shardsvr_drop_collection_if_uuid_not_matching_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/authorization_session.h" #include "mongo/db/catalog/drop_collection.h" @@ -36,6 +35,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/request_types/drop_collection_if_uuid_not_matching_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_drop_collection_participant_command.cpp b/src/mongo/db/s/shardsvr_drop_collection_participant_command.cpp index a9b18cf3f61..d0e82460878 100644 --- a/src/mongo/db/s/shardsvr_drop_collection_participant_command.cpp +++ b/src/mongo/db/s/shardsvr_drop_collection_participant_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_drop_database_command.cpp b/src/mongo/db/s/shardsvr_drop_database_command.cpp index 2ae8fbb35ec..78b6941017c 100644 --- a/src/mongo/db/s/shardsvr_drop_database_command.cpp +++ b/src/mongo/db/s/shardsvr_drop_database_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/authorization_session.h" #include "mongo/db/catalog/collection_catalog.h" @@ -41,6 +40,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_drop_database_participant_command.cpp b/src/mongo/db/s/shardsvr_drop_database_participant_command.cpp index a10c5114cdb..d115c8104ca 100644 --- a/src/mongo/db/s/shardsvr_drop_database_participant_command.cpp +++ b/src/mongo/db/s/shardsvr_drop_database_participant_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_drop_indexes_command.cpp b/src/mongo/db/s/shardsvr_drop_indexes_command.cpp index 0c6d2d4260b..97ec6ca1268 100644 --- a/src/mongo/db/s/shardsvr_drop_indexes_command.cpp +++ b/src/mongo/db/s/shardsvr_drop_indexes_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/authorization_session.h" #include "mongo/db/catalog/collection_catalog.h" @@ -44,6 +43,9 @@ #include "mongo/s/request_types/sharded_ddl_commands_gen.h" #include "mongo/s/stale_shard_version_helpers.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_get_stats_for_balancing_command.cpp b/src/mongo/db/s/shardsvr_get_stats_for_balancing_command.cpp index 512f0f4c721..d3057c4c088 100644 --- a/src/mongo/db/s/shardsvr_get_stats_for_balancing_command.cpp +++ b/src/mongo/db/s/shardsvr_get_stats_for_balancing_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/authorization_session.h" #include "mongo/db/commands.h" @@ -39,6 +38,9 @@ #include "mongo/s/grid.h" #include "mongo/s/sharding_feature_flags_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_merge_chunks_command.cpp b/src/mongo/db/s/shardsvr_merge_chunks_command.cpp index 8c5086a6ae8..c3971e7afd6 100644 --- a/src/mongo/db/s/shardsvr_merge_chunks_command.cpp +++ b/src/mongo/db/s/shardsvr_merge_chunks_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/action_type.h" #include "mongo/db/auth/authorization_session.h" @@ -49,6 +48,9 @@ #include "mongo/s/request_types/merge_chunk_request_gen.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_move_primary_command.cpp b/src/mongo/db/s/shardsvr_move_primary_command.cpp index dbf579eabf6..2fbb2f9362b 100644 --- a/src/mongo/db/s/shardsvr_move_primary_command.cpp +++ b/src/mongo/db/s/shardsvr_move_primary_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/move_primary_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_move_range_command.cpp b/src/mongo/db/s/shardsvr_move_range_command.cpp index bb94ef2cbab..d1d35335967 100644 --- a/src/mongo/db/s/shardsvr_move_range_command.cpp +++ b/src/mongo/db/s/shardsvr_move_range_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/authorization_session.h" #include "mongo/db/commands.h" @@ -43,6 +42,9 @@ #include "mongo/s/request_types/move_chunk_request.h" #include "mongo/s/request_types/move_range_request_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_participant_block_command.cpp b/src/mongo/db/s/shardsvr_participant_block_command.cpp index 8aac71bd487..7735b16c46b 100644 --- a/src/mongo/db/s/shardsvr_participant_block_command.cpp +++ b/src/mongo/db/s/shardsvr_participant_block_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/authorization_session.h" #include "mongo/db/catalog_raii.h" @@ -39,6 +38,9 @@ #include "mongo/s/catalog/sharding_catalog_client.h" #include "mongo/s/chunk_manager_targeter.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_refine_collection_shard_key_command.cpp b/src/mongo/db/s/shardsvr_refine_collection_shard_key_command.cpp index 7a7fa8fceac..7027e3aca9d 100644 --- a/src/mongo/db/s/shardsvr_refine_collection_shard_key_command.cpp +++ b/src/mongo/db/s/shardsvr_refine_collection_shard_key_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/authorization_session.h" #include "mongo/db/commands.h" @@ -37,6 +36,9 @@ #include "mongo/s/refine_collection_shard_key_coordinator_feature_flags_gen.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_rename_collection_command.cpp b/src/mongo/db/s/shardsvr_rename_collection_command.cpp index 5a1918046f4..9373afc86b0 100644 --- a/src/mongo/db/s/shardsvr_rename_collection_command.cpp +++ b/src/mongo/db/s/shardsvr_rename_collection_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/db/auth/authorization_session.h" #include "mongo/db/catalog/rename_collection.h" @@ -40,6 +39,9 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_rename_collection_participant_command.cpp b/src/mongo/db/s/shardsvr_rename_collection_participant_command.cpp index 23a96214a64..73a182754e5 100644 --- a/src/mongo/db/s/shardsvr_rename_collection_participant_command.cpp +++ b/src/mongo/db/s/shardsvr_rename_collection_participant_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/db/write_concern.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_reshard_collection_command.cpp b/src/mongo/db/s/shardsvr_reshard_collection_command.cpp index 5a10de6a559..7902fa61b07 100644 --- a/src/mongo/db/s/shardsvr_reshard_collection_command.cpp +++ b/src/mongo/db/s/shardsvr_reshard_collection_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/s/request_types/sharded_ddl_commands_gen.h" #include "mongo/s/resharding/resharding_feature_flag_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_set_allow_migrations_command.cpp b/src/mongo/db/s/shardsvr_set_allow_migrations_command.cpp index 401356eb0f9..97978dbe994 100644 --- a/src/mongo/db/s/shardsvr_set_allow_migrations_command.cpp +++ b/src/mongo/db/s/shardsvr_set_allow_migrations_command.cpp @@ -28,8 +28,6 @@ */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding - #include "mongo/db/auth/authorization_session.h" #include "mongo/db/catalog/collection_catalog.h" #include "mongo/db/commands.h" @@ -38,6 +36,9 @@ #include "mongo/db/s/sharding_state.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_set_cluster_parameter_command.cpp b/src/mongo/db/s/shardsvr_set_cluster_parameter_command.cpp index 08ddd4d5a01..d5d2593bdf2 100644 --- a/src/mongo/db/s/shardsvr_set_cluster_parameter_command.cpp +++ b/src/mongo/db/s/shardsvr_set_cluster_parameter_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_set_user_write_block_mode_command.cpp b/src/mongo/db/s/shardsvr_set_user_write_block_mode_command.cpp index 0ab0b54e0a9..49bdc1b90bb 100644 --- a/src/mongo/db/s/shardsvr_set_user_write_block_mode_command.cpp +++ b/src/mongo/db/s/shardsvr_set_user_write_block_mode_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/s/request_types/sharded_ddl_commands_gen.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_split_chunk_command.cpp b/src/mongo/db/s/shardsvr_split_chunk_command.cpp index a929c7ec2f6..7165e2661c1 100644 --- a/src/mongo/db/s/shardsvr_split_chunk_command.cpp +++ b/src/mongo/db/s/shardsvr_split_chunk_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include <string> #include <vector> @@ -46,6 +45,9 @@ #include "mongo/s/catalog/type_chunk.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/split_chunk.cpp b/src/mongo/db/s/split_chunk.cpp index 3ea599847ef..062f5b47752 100644 --- a/src/mongo/db/s/split_chunk.cpp +++ b/src/mongo/db/s/split_chunk.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/s/split_chunk.h" @@ -51,6 +50,9 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/split_vector.cpp b/src/mongo/db/s/split_vector.cpp index 276b91951e7..2bc0b8507de 100644 --- a/src/mongo/db/s/split_vector.cpp +++ b/src/mongo/db/s/split_vector.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/db/s/shard_key_index_util.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/split_vector_test.cpp b/src/mongo/db/s/split_vector_test.cpp index 3f70728f92e..f2a63755cf5 100644 --- a/src/mongo/db/s/split_vector_test.cpp +++ b/src/mongo/db/s/split_vector_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/db/s/shard_server_test_fixture.h" #include "mongo/db/s/split_vector.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/transaction_coordinator.cpp b/src/mongo/db/s/transaction_coordinator.cpp index 2c6cafd1b9b..69775f4209f 100644 --- a/src/mongo/db/s/transaction_coordinator.cpp +++ b/src/mongo/db/s/transaction_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/util/cancellation.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction + + namespace mongo { namespace { diff --git a/src/mongo/db/s/transaction_coordinator_catalog.cpp b/src/mongo/db/s/transaction_coordinator_catalog.cpp index d83b681334a..6afd1e8d00f 100644 --- a/src/mongo/db/s/transaction_coordinator_catalog.cpp +++ b/src/mongo/db/s/transaction_coordinator_catalog.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction + + namespace mongo { TransactionCoordinatorCatalog::TransactionCoordinatorCatalog() = default; diff --git a/src/mongo/db/s/transaction_coordinator_futures_util.cpp b/src/mongo/db/s/transaction_coordinator_futures_util.cpp index c31d642cd0c..b2ffa6ce5f1 100644 --- a/src/mongo/db/s/transaction_coordinator_futures_util.cpp +++ b/src/mongo/db/s/transaction_coordinator_futures_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/transport/service_entry_point.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction + + namespace mongo { namespace txn { namespace { diff --git a/src/mongo/db/s/transaction_coordinator_service.cpp b/src/mongo/db/s/transaction_coordinator_service.cpp index 70a6cd7ccd2..f8aed7b8db5 100644 --- a/src/mongo/db/s/transaction_coordinator_service.cpp +++ b/src/mongo/db/s/transaction_coordinator_service.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction + + namespace mongo { namespace { diff --git a/src/mongo/db/s/transaction_coordinator_service_test.cpp b/src/mongo/db/s/transaction_coordinator_service_test.cpp index d09cb36043c..c2e0a3ed542 100644 --- a/src/mongo/db/s/transaction_coordinator_service_test.cpp +++ b/src/mongo/db/s/transaction_coordinator_service_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/idl/server_parameter_test_util.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/s/transaction_coordinator_structures.cpp b/src/mongo/db/s/transaction_coordinator_structures.cpp index 9850645149e..f6cf5121b30 100644 --- a/src/mongo/db/s/transaction_coordinator_structures.cpp +++ b/src/mongo/db/s/transaction_coordinator_structures.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction + + namespace mongo { namespace txn { namespace { diff --git a/src/mongo/db/s/transaction_coordinator_test.cpp b/src/mongo/db/s/transaction_coordinator_test.cpp index 75884bb136f..eb98007776a 100644 --- a/src/mongo/db/s/transaction_coordinator_test.cpp +++ b/src/mongo/db/s/transaction_coordinator_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/util/clock_source_mock.h" #include "mongo/util/tick_source_mock.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/transaction_coordinator_test_fixture.cpp b/src/mongo/db/s/transaction_coordinator_test_fixture.cpp index 023e7deb4b4..7ccb3b5c439 100644 --- a/src/mongo/db/s/transaction_coordinator_test_fixture.cpp +++ b/src/mongo/db/s/transaction_coordinator_test_fixture.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/s/catalog/type_shard.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/s/transaction_coordinator_util.cpp b/src/mongo/db/s/transaction_coordinator_util.cpp index d306598e8ad..7354172e20d 100644 --- a/src/mongo/db/s/transaction_coordinator_util.cpp +++ b/src/mongo/db/s/transaction_coordinator_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction + + namespace mongo { namespace txn { namespace { diff --git a/src/mongo/db/s/txn_two_phase_commit_cmds.cpp b/src/mongo/db/s/txn_two_phase_commit_cmds.cpp index 0841725b711..e60c2ad339e 100644 --- a/src/mongo/db/s/txn_two_phase_commit_cmds.cpp +++ b/src/mongo/db/s/txn_two_phase_commit_cmds.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction + + namespace mongo { namespace { diff --git a/src/mongo/db/s/user_writes_recoverable_critical_section_service.cpp b/src/mongo/db/s/user_writes_recoverable_critical_section_service.cpp index 6e15c008f19..4fa8a1d5bd2 100644 --- a/src/mongo/db/s/user_writes_recoverable_critical_section_service.cpp +++ b/src/mongo/db/s/user_writes_recoverable_critical_section_service.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/catalog/sharding_catalog_client.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace user_writes_recoverable_critical_section_util { diff --git a/src/mongo/db/s/wait_for_ongoing_chunk_splits_command.cpp b/src/mongo/db/s/wait_for_ongoing_chunk_splits_command.cpp index ff470884b98..e61b02e6777 100644 --- a/src/mongo/db/s/wait_for_ongoing_chunk_splits_command.cpp +++ b/src/mongo/db/s/wait_for_ongoing_chunk_splits_command.cpp @@ -27,13 +27,15 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" #include "mongo/db/commands.h" #include "mongo/db/s/chunk_splitter.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/db/server_options.cpp b/src/mongo/db/server_options.cpp index 195bb70a12d..28725ceb508 100644 --- a/src/mongo/db/server_options.cpp +++ b/src/mongo/db/server_options.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/version/releases.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { /** diff --git a/src/mongo/db/server_options_helpers.cpp b/src/mongo/db/server_options_helpers.cpp index 9ed7af1f62a..9d19006ee7a 100644 --- a/src/mongo/db/server_options_helpers.cpp +++ b/src/mongo/db/server_options_helpers.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/db/server_options_helpers.h" @@ -62,6 +61,9 @@ #include "mongo/util/options_parser/startup_options.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + using std::endl; using std::string; diff --git a/src/mongo/db/server_options_server_helpers.cpp b/src/mongo/db/server_options_server_helpers.cpp index 57f05b16ba4..a80bdc5a1e8 100644 --- a/src/mongo/db/server_options_server_helpers.cpp +++ b/src/mongo/db/server_options_server_helpers.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/db/server_options_server_helpers.h" @@ -60,6 +59,9 @@ #include "mongo/util/options_parser/startup_options.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + using std::endl; using std::string; diff --git a/src/mongo/db/server_options_test.cpp b/src/mongo/db/server_options_test.cpp index c8ef037ee40..dbcc1c94143 100644 --- a/src/mongo/db/server_options_test.cpp +++ b/src/mongo/db/server_options_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -64,6 +63,8 @@ #include "mongo/util/options_parser/options_parser.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + namespace mongo { namespace { diff --git a/src/mongo/db/serverless/shard_split_donor_service.cpp b/src/mongo/db/serverless/shard_split_donor_service.cpp index 4ea4779f462..290bc98f144 100644 --- a/src/mongo/db/serverless/shard_split_donor_service.cpp +++ b/src/mongo/db/serverless/shard_split_donor_service.cpp @@ -27,8 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration - #include "mongo/db/serverless/shard_split_donor_service.h" #include "mongo/client/streamable_replica_set_monitor.h" @@ -51,6 +49,9 @@ #include "mongo/util/future_util.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration + + namespace mongo { namespace { diff --git a/src/mongo/db/serverless/shard_split_donor_service_test.cpp b/src/mongo/db/serverless/shard_split_donor_service_test.cpp index aad81bbf5dc..d88360f6569 100644 --- a/src/mongo/db/serverless/shard_split_donor_service_test.cpp +++ b/src/mongo/db/serverless/shard_split_donor_service_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include <memory> @@ -71,6 +70,8 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/clock_source_mock.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + namespace mongo { /** diff --git a/src/mongo/db/service_context.cpp b/src/mongo/db/service_context.cpp index 0de0541aa88..750a9671899 100644 --- a/src/mongo/db/service_context.cpp +++ b/src/mongo/db/service_context.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include "mongo/util/system_tick_source.h" #include <iostream> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/db/service_context_d_test_fixture.cpp b/src/mongo/db/service_context_d_test_fixture.cpp index dd8e182f665..400993c49bb 100644 --- a/src/mongo/db/service_context_d_test_fixture.cpp +++ b/src/mongo/db/service_context_d_test_fixture.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -57,6 +56,9 @@ #include "mongo/util/clock_source_mock.h" #include "mongo/util/periodic_runner_factory.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { ServiceContextMongoDTest::ServiceContextMongoDTest(Options options) diff --git a/src/mongo/db/service_entry_point_common.cpp b/src/mongo/db/service_entry_point_common.cpp index 2174a4859c0..7fc21f0863e 100644 --- a/src/mongo/db/service_entry_point_common.cpp +++ b/src/mongo/db/service_entry_point_common.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/db/service_entry_point_common.h" @@ -113,6 +112,9 @@ #include "mongo/util/future_util.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { MONGO_FAIL_POINT_DEFINE(respondWithNotPrimaryInCommandDispatch); diff --git a/src/mongo/db/service_entry_point_mongod.cpp b/src/mongo/db/service_entry_point_mongod.cpp index f47f6487ba3..f3f0ffac6c2 100644 --- a/src/mongo/db/service_entry_point_mongod.cpp +++ b/src/mongo/db/service_entry_point_mongod.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -53,6 +52,9 @@ #include "mongo/s/shard_cannot_refresh_due_to_locks_held_exception.h" #include "mongo/s/stale_exception.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { constexpr auto kLastCommittedOpTimeFieldName = "lastCommittedOpTime"_sd; diff --git a/src/mongo/db/service_liaison_mongod.cpp b/src/mongo/db/service_liaison_mongod.cpp index 6817bf22a66..b1b956c48e3 100644 --- a/src/mongo/db/service_liaison_mongod.cpp +++ b/src/mongo/db/service_liaison_mongod.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/platform/mutex.h" #include "mongo/util/clock_source.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { LogicalSessionIdSet ServiceLiaisonMongod::getActiveOpSessions() const { diff --git a/src/mongo/db/service_liaison_mongos.cpp b/src/mongo/db/service_liaison_mongos.cpp index dd9dc275efa..979ab179779 100644 --- a/src/mongo/db/service_liaison_mongos.cpp +++ b/src/mongo/db/service_liaison_mongos.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/s/query/cluster_cursor_manager.h" #include "mongo/util/clock_source.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { LogicalSessionIdSet ServiceLiaisonMongos::getActiveOpSessions() const { diff --git a/src/mongo/db/session_catalog.cpp b/src/mongo/db/session_catalog.cpp index ce0d3f1e416..ae855b59e96 100644 --- a/src/mongo/db/session_catalog.cpp +++ b/src/mongo/db/session_catalog.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite + + namespace mongo { namespace { diff --git a/src/mongo/db/session_catalog_mongod.cpp b/src/mongo/db/session_catalog_mongod.cpp index 53a8c9168dc..49a4acd2405 100644 --- a/src/mongo/db/session_catalog_mongod.cpp +++ b/src/mongo/db/session_catalog_mongod.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include "mongo/util/concurrency/thread_pool.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction + + namespace mongo { namespace { diff --git a/src/mongo/db/session_catalog_test.cpp b/src/mongo/db/session_catalog_test.cpp index ad8bd6e076f..ead9c100058 100644 --- a/src/mongo/db/session_catalog_test.cpp +++ b/src/mongo/db/session_catalog_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/util/concurrency/thread_pool.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/db/sorter/sorter.cpp b/src/mongo/db/sorter/sorter.cpp index 722b41c3e73..c23c2695afd 100644 --- a/src/mongo/db/sorter/sorter.cpp +++ b/src/mongo/db/sorter/sorter.cpp @@ -58,6 +58,7 @@ #include "mongo/db/service_context.h" #include "mongo/db/storage/encryption_hooks.h" #include "mongo/db/storage/storage_options.h" +#include "mongo/logv2/log.h" #include "mongo/platform/atomic_word.h" #include "mongo/platform/overflow_arithmetic.h" #include "mongo/s/is_mongos.h" @@ -65,15 +66,7 @@ #include "mongo/util/destructor_guard.h" #include "mongo/util/str.h" -// As this file is included in various places we need to handle the case of having the log header -// already included -#ifndef MONGO_LOGV2_DEFAULT_COMPONENT #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault -#endif - -#ifndef MONGO_UTIL_LOGV2_H_ -#include "mongo/logv2/log.h" -#endif namespace mongo { @@ -1597,3 +1590,4 @@ Sorter<Key, Value>* Sorter<Key, Value>::makeFromExistingRanges( fileName, ranges, opts, comp, settings); } } // namespace mongo +#undef MONGO_LOGV2_DEFAULT_COMPONENT diff --git a/src/mongo/db/sorter/sorter_test.cpp b/src/mongo/db/sorter/sorter_test.cpp index 3388d35b8f5..aa5a8dc4078 100644 --- a/src/mongo/db/sorter/sorter_test.cpp +++ b/src/mongo/db/sorter/sorter_test.cpp @@ -28,7 +28,6 @@ */ #include "mongo/db/pipeline/document_source.h" -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -69,6 +68,9 @@ std::string nextFileName() { // Need access to internal classes #include "mongo/db/sorter/sorter.cpp" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace sorter { namespace { diff --git a/src/mongo/db/startup_recovery.cpp b/src/mongo/db/startup_recovery.cpp index 651f9b64d90..21a1e46959a 100644 --- a/src/mongo/db/startup_recovery.cpp +++ b/src/mongo/db/startup_recovery.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -63,6 +62,9 @@ #include <sys/file.h> #endif +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { using startup_recovery::StartupRecoveryMode; diff --git a/src/mongo/db/startup_warnings_common.cpp b/src/mongo/db/startup_warnings_common.cpp index 0c73f543064..7d1c41a43a4 100644 --- a/src/mongo/db/startup_warnings_common.cpp +++ b/src/mongo/db/startup_warnings_common.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/util/processinfo.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { #ifdef _WIN32 diff --git a/src/mongo/db/startup_warnings_mongod.cpp b/src/mongo/db/startup_warnings_mongod.cpp index 9f9930ef342..d1973e06866 100644 --- a/src/mongo/db/startup_warnings_mongod.cpp +++ b/src/mongo/db/startup_warnings_mongod.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/util/str.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/db/stats/counters.cpp b/src/mongo/db/stats/counters.cpp index e6099775e85..f8bead3f388 100644 --- a/src/mongo/db/stats/counters.cpp +++ b/src/mongo/db/stats/counters.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/db/jsobj.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/db/stats/resource_consumption_metrics.cpp b/src/mongo/db/stats/resource_consumption_metrics.cpp index f5735150cd3..92e7a64c259 100644 --- a/src/mongo/db/stats/resource_consumption_metrics.cpp +++ b/src/mongo/db/stats/resource_consumption_metrics.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include <cmath> @@ -38,6 +37,9 @@ #include "mongo/db/stats/operation_resource_consumption_gen.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { const OperationContext::Decoration<ResourceConsumption::MetricsCollector> getMetricsCollector = diff --git a/src/mongo/db/stats/storage_stats.cpp b/src/mongo/db/stats/storage_stats.cpp index 870dc908021..1bac7d233ae 100644 --- a/src/mongo/db/stats/storage_stats.cpp +++ b/src/mongo/db/stats/storage_stats.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/db/stats/storage_stats.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC + + namespace mongo { namespace { diff --git a/src/mongo/db/stats/top.cpp b/src/mongo/db/stats/top.cpp index 513b7fae754..ecba3255208 100644 --- a/src/mongo/db/stats/top.cpp +++ b/src/mongo/db/stats/top.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/db/jsobj.h" #include "mongo/db/service_context.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { using std::endl; diff --git a/src/mongo/db/storage/checkpointer.cpp b/src/mongo/db/storage/checkpointer.cpp index 825e914d062..4c4a2014a48 100644 --- a/src/mongo/db/storage/checkpointer.cpp +++ b/src/mongo/db/storage/checkpointer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/util/concurrency/idle_thread_block.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/storage/control/journal_flusher.cpp b/src/mongo/db/storage/control/journal_flusher.cpp index 212f51cd88f..5ee28c5137c 100644 --- a/src/mongo/db/storage/control/journal_flusher.cpp +++ b/src/mongo/db/storage/control/journal_flusher.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/util/concurrency/idle_thread_block.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/storage/control/storage_control.cpp b/src/mongo/db/storage/control/storage_control.cpp index 8b384cbc72f..c5a0706f3da 100644 --- a/src/mongo/db/storage/control/storage_control.cpp +++ b/src/mongo/db/storage/control/storage_control.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/db/storage/storage_options.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace StorageControl { diff --git a/src/mongo/db/storage/deferred_drop_record_store.cpp b/src/mongo/db/storage/deferred_drop_record_store.cpp index 2fd14d88f37..6abc449cb60 100644 --- a/src/mongo/db/storage/deferred_drop_record_store.cpp +++ b/src/mongo/db/storage/deferred_drop_record_store.cpp @@ -27,13 +27,14 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/db/storage/deferred_drop_record_store.h" #include "mongo/db/storage/storage_engine.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + namespace mongo { DeferredDropRecordStore::~DeferredDropRecordStore() { diff --git a/src/mongo/db/storage/devnull/ephemeral_catalog_record_store.cpp b/src/mongo/db/storage/devnull/ephemeral_catalog_record_store.cpp index 169d7f8153b..e7e661b8d81 100644 --- a/src/mongo/db/storage/devnull/ephemeral_catalog_record_store.cpp +++ b/src/mongo/db/storage/devnull/ephemeral_catalog_record_store.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/db/storage/devnull/ephemeral_catalog_record_store.h" @@ -41,6 +40,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { using std::shared_ptr; diff --git a/src/mongo/db/storage/durable_catalog_impl.cpp b/src/mongo/db/storage/durable_catalog_impl.cpp index b379c3be729..41ae75e0626 100644 --- a/src/mongo/db/storage/durable_catalog_impl.cpp +++ b/src/mongo/db/storage/durable_catalog_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/db/storage/durable_catalog_impl.h" @@ -53,6 +52,9 @@ #include "mongo/platform/random.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { // This is a global resource, which protects accesses to the catalog metadata (instance-wide). diff --git a/src/mongo/db/storage/durable_history_pin.cpp b/src/mongo/db/storage/durable_history_pin.cpp index cc1d0c10c9a..505e5816421 100644 --- a/src/mongo/db/storage/durable_history_pin.cpp +++ b/src/mongo/db/storage/durable_history_pin.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #define LOGV2_FOR_RECOVERY(ID, DLEVEL, MESSAGE, ...) \ LOGV2_DEBUG_OPTIONS(ID, DLEVEL, {logv2::LogComponent::kStorageRecovery}, MESSAGE, ##__VA_ARGS__) @@ -42,6 +41,9 @@ #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/storage/flow_control.cpp b/src/mongo/db/storage/flow_control.cpp index d3a5a279c88..1866f16af6c 100644 --- a/src/mongo/db/storage/flow_control.cpp +++ b/src/mongo/db/storage/flow_control.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/util/background.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + #define DEBUG_LOG_LEVEL 4 namespace mongo { diff --git a/src/mongo/db/storage/flow_control_test.cpp b/src/mongo/db/storage/flow_control_test.cpp index faa21a4463c..cc63adb14a6 100644 --- a/src/mongo/db/storage/flow_control_test.cpp +++ b/src/mongo/db/storage/flow_control_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/logv2/log_debug.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { class FlowControlTest : public ServiceContextMongoDTest { diff --git a/src/mongo/db/storage/historical_ident_tracker.cpp b/src/mongo/db/storage/historical_ident_tracker.cpp index becf6898453..34a1a72b2a7 100644 --- a/src/mongo/db/storage/historical_ident_tracker.cpp +++ b/src/mongo/db/storage/historical_ident_tracker.cpp @@ -27,11 +27,13 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/db/storage/historical_ident_tracker.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/storage/key_string.cpp b/src/mongo/db/storage/key_string.cpp index d4a9e8efde3..154dd3a59fa 100644 --- a/src/mongo/db/storage/key_string.cpp +++ b/src/mongo/db/storage/key_string.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/util/decimal_counter.h" #include "mongo/util/hex.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + #define keyStringAssert(msgid, msg, expr) \ uassert(msgid, str::stream() << "KeyString format error: " << msg, expr) #define keyStringAsserted(msgid, msg) \ diff --git a/src/mongo/db/storage/key_string_bm.cpp b/src/mongo/db/storage/key_string_bm.cpp index 263a6030ec5..bb500fc0a45 100644 --- a/src/mongo/db/storage/key_string_bm.cpp +++ b/src/mongo/db/storage/key_string_bm.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/platform/decimal128.h" #include "mongo/util/bufreader.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/storage/key_string_test.cpp b/src/mongo/db/storage/key_string_test.cpp index ef9f7e744a5..733e527243f 100644 --- a/src/mongo/db/storage/key_string_test.cpp +++ b/src/mongo/db/storage/key_string_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -55,6 +54,9 @@ #include "mongo/util/hex.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + using std::string; using namespace mongo; diff --git a/src/mongo/db/storage/kv/kv_drop_pending_ident_reaper.cpp b/src/mongo/db/storage/kv/kv_drop_pending_ident_reaper.cpp index 061e9b72d8e..300958725fe 100644 --- a/src/mongo/db/storage/kv/kv_drop_pending_ident_reaper.cpp +++ b/src/mongo/db/storage/kv/kv_drop_pending_ident_reaper.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/db/storage/write_unit_of_work.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { KVDropPendingIdentReaper::KVDropPendingIdentReaper(KVEngine* engine) : _engine(engine) {} diff --git a/src/mongo/db/storage/kv/storage_engine_test.cpp b/src/mongo/db/storage/kv/storage_engine_test.cpp index 85917569697..2b600a7479d 100644 --- a/src/mongo/db/storage/kv/storage_engine_test.cpp +++ b/src/mongo/db/storage/kv/storage_engine_test.cpp @@ -57,6 +57,7 @@ #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + namespace mongo { namespace { diff --git a/src/mongo/db/storage/oplog_cap_maintainer_thread.cpp b/src/mongo/db/storage/oplog_cap_maintainer_thread.cpp index 4364a6d9839..d648c4bc622 100644 --- a/src/mongo/db/storage/oplog_cap_maintainer_thread.cpp +++ b/src/mongo/db/storage/oplog_cap_maintainer_thread.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/storage/recovery_unit.cpp b/src/mongo/db/storage/recovery_unit.cpp index 4727d564daf..ad98239448e 100644 --- a/src/mongo/db/storage/recovery_unit.cpp +++ b/src/mongo/db/storage/recovery_unit.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { // SnapshotIds need to be globally unique, as they are used in a WorkingSetMember to diff --git a/src/mongo/db/storage/remove_saver.cpp b/src/mongo/db/storage/remove_saver.cpp index 5cd5f367567..d4d40d92239 100644 --- a/src/mongo/db/storage/remove_saver.cpp +++ b/src/mongo/db/storage/remove_saver.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -43,6 +42,8 @@ #include "mongo/logv2/log.h" #include "mongo/util/errno_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + using std::ios_base; using std::ofstream; diff --git a/src/mongo/db/storage/snapshot_helper.cpp b/src/mongo/db/storage/snapshot_helper.cpp index 1245ff9f2ad..2fecee62b26 100644 --- a/src/mongo/db/storage/snapshot_helper.cpp +++ b/src/mongo/db/storage/snapshot_helper.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/db/repl/replication_coordinator.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { bool canReadAtLastApplied(OperationContext* opCtx) { diff --git a/src/mongo/db/storage/storage_engine_change_context.cpp b/src/mongo/db/storage/storage_engine_change_context.cpp index 1f9ba9a4cb1..812ab2d3ea3 100644 --- a/src/mongo/db/storage/storage_engine_change_context.cpp +++ b/src/mongo/db/storage/storage_engine_change_context.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/db/storage/recovery_unit_noop.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { const ServiceContext::Decoration<StorageEngineChangeContext> getStorageEngineChangeContext = diff --git a/src/mongo/db/storage/storage_engine_impl.cpp b/src/mongo/db/storage/storage_engine_impl.cpp index a70e6039c23..c55aacfe066 100644 --- a/src/mongo/db/storage/storage_engine_impl.cpp +++ b/src/mongo/db/storage/storage_engine_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/db/storage/storage_engine_impl.h" @@ -59,6 +58,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + #define LOGV2_FOR_RECOVERY(ID, DLEVEL, MESSAGE, ...) \ LOGV2_DEBUG_OPTIONS(ID, DLEVEL, {logv2::LogComponent::kStorageRecovery}, MESSAGE, ##__VA_ARGS__) diff --git a/src/mongo/db/storage/storage_engine_init.cpp b/src/mongo/db/storage/storage_engine_init.cpp index 054437892a3..1280c2aad96 100644 --- a/src/mongo/db/storage/storage_engine_init.cpp +++ b/src/mongo/db/storage/storage_engine_init.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -55,6 +54,9 @@ #include "mongo/util/concurrency/ticketholder.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/storage/storage_engine_lock_file.cpp b/src/mongo/db/storage/storage_engine_lock_file.cpp index ff82910244d..be9ee83048c 100644 --- a/src/mongo/db/storage/storage_engine_lock_file.cpp +++ b/src/mongo/db/storage/storage_engine_lock_file.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/platform/process_id.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/storage/storage_engine_lock_file_posix.cpp b/src/mongo/db/storage/storage_engine_lock_file_posix.cpp index bb96b23bffd..41fefe73cdf 100644 --- a/src/mongo/db/storage/storage_engine_lock_file_posix.cpp +++ b/src/mongo/db/storage/storage_engine_lock_file_posix.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/storage/storage_engine_lock_file_windows.cpp b/src/mongo/db/storage/storage_engine_lock_file_windows.cpp index 07dfbffd9d2..6a5cb553fbb 100644 --- a/src/mongo/db/storage/storage_engine_lock_file_windows.cpp +++ b/src/mongo/db/storage/storage_engine_lock_file_windows.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/util/str.h" #include "mongo/util/text.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/storage/storage_engine_metadata.cpp b/src/mongo/db/storage/storage_engine_metadata.cpp index 2bb7c548af8..31ebf624f5f 100644 --- a/src/mongo/db/storage/storage_engine_metadata.cpp +++ b/src/mongo/db/storage/storage_engine_metadata.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -57,6 +56,9 @@ #include "mongo/util/file.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace dps = ::mongo::dotted_path_support; diff --git a/src/mongo/db/storage/storage_file_util.cpp b/src/mongo/db/storage/storage_file_util.cpp index 6073acf89d0..96d0c8e7510 100644 --- a/src/mongo/db/storage/storage_file_util.cpp +++ b/src/mongo/db/storage/storage_file_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/db/storage/storage_file_util.h" @@ -45,6 +44,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/file.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { Status fsyncFile(const boost::filesystem::path& path) { diff --git a/src/mongo/db/storage/storage_repair_observer.cpp b/src/mongo/db/storage/storage_repair_observer.cpp index 29c0037716b..7aaa53423ff 100644 --- a/src/mongo/db/storage/storage_repair_observer.cpp +++ b/src/mongo/db/storage/storage_repair_observer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/db/storage/storage_repair_observer.h" @@ -53,6 +52,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/file.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/storage/storage_repair_observer_test.cpp b/src/mongo/db/storage/storage_repair_observer_test.cpp index 204ba7fc7de..580ca293505 100644 --- a/src/mongo/db/storage/storage_repair_observer_test.cpp +++ b/src/mongo/db/storage/storage_repair_observer_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/unittest/death_test.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/storage/storage_util.cpp b/src/mongo/db/storage/storage_util.cpp index 0dace14bfd2..cdc8a43e5c9 100644 --- a/src/mongo/db/storage/storage_util.cpp +++ b/src/mongo/db/storage/storage_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/db/storage/storage_engine.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace catalog { namespace { diff --git a/src/mongo/db/storage/wiredtiger/oplog_stones_server_status_section.cpp b/src/mongo/db/storage/wiredtiger/oplog_stones_server_status_section.cpp index d973fd45a5d..ebf99113d74 100644 --- a/src/mongo/db/storage/wiredtiger/oplog_stones_server_status_section.cpp +++ b/src/mongo/db/storage/wiredtiger/oplog_stones_server_status_section.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/db/tenant_database_name.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC + + namespace mongo { class OplogStonesServerStatusSection : public ServerStatusSection { public: diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_begin_transaction_block.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_begin_transaction_block.cpp index 42ab62e3b2a..100f1ab4aec 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_begin_transaction_block.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_begin_transaction_block.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/db/storage/wiredtiger/wiredtiger_util.h" #include "mongo/util/errno_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { using namespace fmt::literals; diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_column_store.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_column_store.cpp index 73c980a2858..e36f3d9a1da 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_column_store.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_column_store.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/db/storage/wiredtiger/wiredtiger_util.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { StatusWith<std::string> WiredTigerColumnStore::generateCreateString( const std::string& engineName, diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_cursor.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_cursor.cpp index 6d39a8cfb3a..188983bf071 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_cursor.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_cursor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/db/storage/wiredtiger/wiredtiger_util.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { WiredTigerCursor::WiredTigerCursor(const std::string& uri, diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_global_options.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_global_options.cpp index 8149bab8757..47177fa4058 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_global_options.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_global_options.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace moe = mongo::optionenvironment; namespace mongo { diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_import.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_import.cpp index c65ff5528bb..b82832ba78d 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_import.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_import.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration #include "wiredtiger_import.h" @@ -44,6 +43,9 @@ #include "mongo/db/storage/wiredtiger/wiredtiger_util.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTenantMigration + + namespace mongo { using namespace fmt::literals; diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp index 2a32195d91f..68f6395d482 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_index.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -63,6 +62,9 @@ #include "mongo/util/str.h" #include "mongo/util/testing_proctor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + #define TRACING_ENABLED 0 #define LOGV2_TRACE_CURSOR(ID, NAME, ...) \ diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_init.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_init.cpp index b674bd24111..e5ceaea5c82 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_init.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_init.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #if defined(__linux__) #include <sys/vfs.h> @@ -58,6 +57,9 @@ #include <sanitizer/lsan_interface.h> #endif +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp index c62fbaf3c06..2d0acf965da 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #define LOGV2_FOR_RECOVERY(ID, DLEVEL, MESSAGE, ...) \ LOGV2_DEBUG_OPTIONS(ID, DLEVEL, {logv2::LogComponent::kStorageRecovery}, MESSAGE, ##__VA_ARGS__) @@ -106,6 +105,9 @@ #include "mongo/util/testing_proctor.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + using namespace fmt::literals; namespace mongo { diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp index c587811c169..5d12f5b5906 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/clock_source_mock.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp index 332f3bb0519..bb9fb1db386 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/util/concurrency/idle_thread_block.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { MONGO_FAIL_POINT_DEFINE(WTPauseOplogVisibilityUpdateLoop); diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.cpp index 1e6f7816f65..02831180a11 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { using std::string; diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_prepare_conflict.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_prepare_conflict.cpp index 2fb1ccbdc0e..4115fd85698 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_prepare_conflict.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_prepare_conflict.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/stacktrace.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp index 743c1ac03af..132c7cde272 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_record_store.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #define LOGV2_FOR_RECOVERY(ID, DLEVEL, MESSAGE, ...) \ LOGV2_DEBUG_OPTIONS(ID, DLEVEL, {logv2::LogComponent::kStorageRecovery}, MESSAGE, ##__VA_ARGS__) @@ -75,6 +74,9 @@ #include "mongo/util/time_support.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { using namespace fmt::literals; diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp index 5e3c0737c55..d841071a6f2 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include <fmt/compile.h> #include <fmt/format.h> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_server_status.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_server_status.cpp index caf44b7c2bd..3a956ab2370 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_server_status.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_server_status.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC + + namespace mongo { using std::string; diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp index 465a4470666..a242b3ec425 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/stdx/thread.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { WiredTigerSession::WiredTigerSession(WT_CONNECTION* conn, uint64_t epoch, uint64_t cursorEpoch) diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_size_storer.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_size_storer.cpp index d326df17ae6..0259e5d50d1 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_size_storer.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_size_storer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { WiredTigerSizeStorer::WiredTigerSizeStorer(WT_CONNECTION* conn, const std::string& storageUri) diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_snapshot_manager.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_snapshot_manager.cpp index 76ecbee0aa9..77af6e842f8 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_snapshot_manager.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_snapshot_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/db/storage/wiredtiger/wiredtiger_util.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { MONGO_FAIL_POINT_DEFINE(hangBeforeMajorityReadTransactionStarted); diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp index 8ff08bb1605..810f0f1fec9 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWiredTiger #include "mongo/platform/basic.h" @@ -62,6 +61,9 @@ #include "mongo/util/str.h" #include "mongo/util/testing_proctor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWiredTiger + + // From src/third_party/wiredtiger/src/include/txn.h #define WT_TXN_ROLLBACK_REASON_CACHE "oldest pinned transaction ID rolled back for eviction" diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_util_test.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_util_test.cpp index 088fb820474..68c0c049ab0 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_util_test.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_util_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/system_clock_source.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { using std::string; diff --git a/src/mongo/db/storage/write_unit_of_work.cpp b/src/mongo/db/storage/write_unit_of_work.cpp index 6768c1a5386..bca9fa16040 100644 --- a/src/mongo/db/storage/write_unit_of_work.cpp +++ b/src/mongo/db/storage/write_unit_of_work.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { MONGO_FAIL_POINT_DEFINE(sleepBeforeCommit); diff --git a/src/mongo/db/system_index.cpp b/src/mongo/db/system_index.cpp index 8386e02710a..0e98bddd767 100644 --- a/src/mongo/db/system_index.cpp +++ b/src/mongo/db/system_index.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + using namespace std::chrono_literals; namespace mongo { diff --git a/src/mongo/db/timeseries/bucket_compression.cpp b/src/mongo/db/timeseries/bucket_compression.cpp index 7d6e6961687..94fa5264647 100644 --- a/src/mongo/db/timeseries/bucket_compression.cpp +++ b/src/mongo/db/timeseries/bucket_compression.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/db/timeseries/bucket_compression.h" @@ -40,6 +39,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace timeseries { diff --git a/src/mongo/db/timeseries/timeseries_collmod.cpp b/src/mongo/db/timeseries/timeseries_collmod.cpp index 1e8ad8e186d..114eecb3532 100644 --- a/src/mongo/db/timeseries/timeseries_collmod.cpp +++ b/src/mongo/db/timeseries/timeseries_collmod.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/db/timeseries/timeseries_collmod.h" @@ -37,6 +36,9 @@ #include "mongo/logv2/log.h" #include "mongo/logv2/redaction.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace timeseries { diff --git a/src/mongo/db/timeseries/timeseries_commands_conversion_helper.cpp b/src/mongo/db/timeseries/timeseries_commands_conversion_helper.cpp index 8b0a2f512b7..be234d0d95f 100644 --- a/src/mongo/db/timeseries/timeseries_commands_conversion_helper.cpp +++ b/src/mongo/db/timeseries/timeseries_commands_conversion_helper.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/db/timeseries/timeseries_commands_conversion_helper.h" @@ -42,6 +41,9 @@ #include "mongo/logv2/log.h" #include "mongo/logv2/redaction.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo::timeseries { namespace { diff --git a/src/mongo/db/timeseries/timeseries_index_schema_conversion_functions.cpp b/src/mongo/db/timeseries/timeseries_index_schema_conversion_functions.cpp index 5103dd3a021..83b6e3f6e9d 100644 --- a/src/mongo/db/timeseries/timeseries_index_schema_conversion_functions.cpp +++ b/src/mongo/db/timeseries/timeseries_index_schema_conversion_functions.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/db/timeseries/timeseries_index_schema_conversion_functions.h" @@ -40,6 +39,9 @@ #include "mongo/logv2/log.h" #include "mongo/logv2/redaction.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo::timeseries { namespace { diff --git a/src/mongo/db/transaction_api.cpp b/src/mongo/db/transaction_api.cpp index c67621e8a0b..2fb3f78e0e0 100644 --- a/src/mongo/db/transaction_api.cpp +++ b/src/mongo/db/transaction_api.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction #include "mongo/db/transaction_api.h" @@ -62,6 +61,9 @@ #include "mongo/util/cancellation.h" #include "mongo/util/future_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction + + // TODO SERVER-65395: Remove failpoint when fle2 tests can reliably support internal transaction // retry limit. MONGO_FAIL_POINT_DEFINE(skipTransactionApiRetryCheckInHandleError); diff --git a/src/mongo/db/transaction_participant.cpp b/src/mongo/db/transaction_participant.cpp index 327a9f55d0f..f84c4c6fe2d 100644 --- a/src/mongo/db/transaction_participant.cpp +++ b/src/mongo/db/transaction_participant.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #define LOGV2_FOR_TRANSACTION(ID, DLEVEL, MESSAGE, ...) \ LOGV2_DEBUG_OPTIONS(ID, DLEVEL, {logv2::LogComponent::kTransaction}, MESSAGE, ##__VA_ARGS__) @@ -79,6 +78,9 @@ #include "mongo/util/log_with_sampling.h" #include "mongo/util/net/socket_utils.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { using namespace fmt::literals; namespace { diff --git a/src/mongo/db/ttl.cpp b/src/mongo/db/ttl.cpp index 955d6db9e92..2b8e7ada1d0 100644 --- a/src/mongo/db/ttl.cpp +++ b/src/mongo/db/ttl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex #include "mongo/platform/basic.h" @@ -67,6 +66,9 @@ #include "mongo/util/concurrency/idle_thread_block.h" #include "mongo/util/log_with_sampling.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kIndex + + namespace mongo { class TTLMonitor; diff --git a/src/mongo/db/ttl_collection_cache.cpp b/src/mongo/db/ttl_collection_cache.cpp index 27d1335510c..7343afddfea 100644 --- a/src/mongo/db/ttl_collection_cache.cpp +++ b/src/mongo/db/ttl_collection_cache.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { MONGO_FAIL_POINT_DEFINE(hangTTLCollectionCacheAfterRegisteringInfo); diff --git a/src/mongo/db/update/delta_executor_test.cpp b/src/mongo/db/update/delta_executor_test.cpp index c1860d10ca8..1c49f4ec3ce 100644 --- a/src/mongo/db/update/delta_executor_test.cpp +++ b/src/mongo/db/update/delta_executor_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/update/document_diff_applier_test.cpp b/src/mongo/db/update/document_diff_applier_test.cpp index 212f9d106e2..f12dce43eb0 100644 --- a/src/mongo/db/update/document_diff_applier_test.cpp +++ b/src/mongo/db/update/document_diff_applier_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo::doc_diff { namespace { /** diff --git a/src/mongo/db/update/document_diff_serialization_test.cpp b/src/mongo/db/update/document_diff_serialization_test.cpp index bcfde9d4ff6..73c3c6a7844 100644 --- a/src/mongo/db/update/document_diff_serialization_test.cpp +++ b/src/mongo/db/update/document_diff_serialization_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/db/update/document_diff_test_helpers.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo::doc_diff { namespace { diff --git a/src/mongo/db/update/document_diff_test.cpp b/src/mongo/db/update/document_diff_test.cpp index b4b02c9f55c..01bd3cac6cd 100644 --- a/src/mongo/db/update/document_diff_test.cpp +++ b/src/mongo/db/update/document_diff_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/unittest/bson_test_util.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo::doc_diff { namespace { diff --git a/src/mongo/db/update/update_oplog_entry_serialization_test.cpp b/src/mongo/db/update/update_oplog_entry_serialization_test.cpp index 5dfc3293cde..4dd08705f4b 100644 --- a/src/mongo/db/update/update_oplog_entry_serialization_test.cpp +++ b/src/mongo/db/update/update_oplog_entry_serialization_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/unittest/death_test.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo::update_oplog_entry { namespace { diff --git a/src/mongo/db/vector_clock_mongod.cpp b/src/mongo/db/vector_clock_mongod.cpp index 8f791e87e3f..bd44018f920 100644 --- a/src/mongo/db/vector_clock_mongod.cpp +++ b/src/mongo/db/vector_clock_mongod.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/logv2/log.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/db/vector_clock_mutable.cpp b/src/mongo/db/vector_clock_mutable.cpp index 601c53e4a7f..9c68f998ccd 100644 --- a/src/mongo/db/vector_clock_mutable.cpp +++ b/src/mongo/db/vector_clock_mutable.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/db/vector_clock_test.cpp b/src/mongo/db/vector_clock_test.cpp index 77e194e8478..af3aef564bd 100644 --- a/src/mongo/db/vector_clock_test.cpp +++ b/src/mongo/db/vector_clock_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/clock_source_mock.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/db/views/durable_view_catalog.cpp b/src/mongo/db/views/durable_view_catalog.cpp index 936fcd64506..53d79de9893 100644 --- a/src/mongo/db/views/durable_view_catalog.cpp +++ b/src/mongo/db/views/durable_view_catalog.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -53,6 +52,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/string_map.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace { diff --git a/src/mongo/db/wire_version.cpp b/src/mongo/db/wire_version.cpp index d86306daf55..5df59309980 100644 --- a/src/mongo/db/wire_version.cpp +++ b/src/mongo/db/wire_version.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/util/static_immortal.h" #include "mongo/util/thread_safety_context.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { WireSpec& WireSpec::instance() { diff --git a/src/mongo/db/write_concern.cpp b/src/mongo/db/write_concern.cpp index 94d5350dfc1..352deaad024 100644 --- a/src/mongo/db/write_concern.cpp +++ b/src/mongo/db/write_concern.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -53,6 +52,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { using repl::OpTime; diff --git a/src/mongo/dbtests/commandtests.cpp b/src/mongo/dbtests/commandtests.cpp index 5f0518c2776..3122f5ff427 100644 --- a/src/mongo/dbtests/commandtests.cpp +++ b/src/mongo/dbtests/commandtests.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/op_msg.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + using namespace mongo; namespace CommandTests { diff --git a/src/mongo/dbtests/framework.cpp b/src/mongo/dbtests/framework.cpp index 330d796e9f3..e6a21724981 100644 --- a/src/mongo/dbtests/framework.cpp +++ b/src/mongo/dbtests/framework.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -63,6 +62,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace dbtests { diff --git a/src/mongo/dbtests/framework_options.cpp b/src/mongo/dbtests/framework_options.cpp index 558a09101b1..9715ecacc15 100644 --- a/src/mongo/dbtests/framework_options.cpp +++ b/src/mongo/dbtests/framework_options.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/util/options_parser/startup_options.h" #include "mongo/util/password.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { using std::cout; diff --git a/src/mongo/dbtests/jsobjtests.cpp b/src/mongo/dbtests/jsobjtests.cpp index 0c20c6f0f9b..a79bf0bbf9b 100644 --- a/src/mongo/dbtests/jsobjtests.cpp +++ b/src/mongo/dbtests/jsobjtests.cpp @@ -31,7 +31,6 @@ * Tests for jsobj.{h,cpp} code */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -53,6 +52,9 @@ #include "mongo/util/str.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { using std::cout; diff --git a/src/mongo/dbtests/jsontests.cpp b/src/mongo/dbtests/jsontests.cpp index 94d1028f95e..d732f2967ee 100644 --- a/src/mongo/dbtests/jsontests.cpp +++ b/src/mongo/dbtests/jsontests.cpp @@ -31,7 +31,6 @@ * Tests for json.{h,cpp} code and BSONObj::jsonString() */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -49,6 +48,8 @@ #include "mongo/platform/decimal128.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + namespace { std::string makeJsonEquvalent(const std::string& json) { diff --git a/src/mongo/dbtests/jstests.cpp b/src/mongo/dbtests/jstests.cpp index 9e48d81b23e..987e2d934c2 100644 --- a/src/mongo/dbtests/jstests.cpp +++ b/src/mongo/dbtests/jstests.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/util/time_support.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + using std::cout; using std::endl; using std::string; diff --git a/src/mongo/dbtests/query_stage_collscan.cpp b/src/mongo/dbtests/query_stage_collscan.cpp index fafbd58c0ef..3a4b201f409 100644 --- a/src/mongo/dbtests/query_stage_collscan.cpp +++ b/src/mongo/dbtests/query_stage_collscan.cpp @@ -31,7 +31,6 @@ * This file tests db/exec/collection_scan.cpp. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -60,6 +59,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace query_stage_collection_scan { using std::unique_ptr; diff --git a/src/mongo/dbtests/repltests.cpp b/src/mongo/dbtests/repltests.cpp index 14451fdbe0c..57fb6112d93 100644 --- a/src/mongo/dbtests/repltests.cpp +++ b/src/mongo/dbtests/repltests.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/logv2/log.h" #include "mongo/transport/transport_layer_asio.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace repl { namespace ReplTests { diff --git a/src/mongo/dbtests/storage_debug_util.cpp b/src/mongo/dbtests/storage_debug_util.cpp index 29266bc6ddd..2bc12341a16 100644 --- a/src/mongo/dbtests/storage_debug_util.cpp +++ b/src/mongo/dbtests/storage_debug_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/db/storage/key_string.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { namespace StorageDebugUtil { diff --git a/src/mongo/dbtests/threadedtests.cpp b/src/mongo/dbtests/threadedtests.cpp index bbaff52ab62..e5fe2ec48df 100644 --- a/src/mongo/dbtests/threadedtests.cpp +++ b/src/mongo/dbtests/threadedtests.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/util/concurrency/ticketholder.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace ThreadedTests { using std::cout; diff --git a/src/mongo/dbtests/wildcard_multikey_persistence_test.cpp b/src/mongo/dbtests/wildcard_multikey_persistence_test.cpp index c57eb9ac4b8..43bc44216d9 100644 --- a/src/mongo/dbtests/wildcard_multikey_persistence_test.cpp +++ b/src/mongo/dbtests/wildcard_multikey_persistence_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include <memory> @@ -41,6 +40,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/embedded/embedded.cpp b/src/mongo/embedded/embedded.cpp index eb2549573b5..907e82e655a 100644 --- a/src/mongo/embedded/embedded.cpp +++ b/src/mongo/embedded/embedded.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -79,6 +78,8 @@ #include <boost/filesystem.hpp> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + namespace mongo { namespace embedded { diff --git a/src/mongo/embedded/embedded_ismaster.cpp b/src/mongo/embedded/embedded_ismaster.cpp index a9f6763952e..b2a26796d62 100644 --- a/src/mongo/embedded/embedded_ismaster.cpp +++ b/src/mongo/embedded/embedded_ismaster.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/db/wire_version.h" #include "mongo/rpc/metadata/client_metadata.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/embedded/embedded_options.cpp b/src/mongo/embedded/embedded_options.cpp index 49649132c7d..5699e55cc25 100644 --- a/src/mongo/embedded/embedded_options.cpp +++ b/src/mongo/embedded/embedded_options.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/embedded/embedded_options.h" @@ -39,6 +38,9 @@ #include <boost/filesystem.hpp> #include <string> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace embedded { diff --git a/src/mongo/embedded/index_builds_coordinator_embedded.cpp b/src/mongo/embedded/index_builds_coordinator_embedded.cpp index d541528a492..a92249c1a35 100644 --- a/src/mongo/embedded/index_builds_coordinator_embedded.cpp +++ b/src/mongo/embedded/index_builds_coordinator_embedded.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/db/service_context.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { void IndexBuildsCoordinatorEmbedded::shutdown(OperationContext* opCtx) {} diff --git a/src/mongo/embedded/mongoc_embedded/mongoc_embedded_test.cpp b/src/mongo/embedded/mongoc_embedded/mongoc_embedded_test.cpp index 23d84deb3f6..fc67b87f200 100644 --- a/src/mongo/embedded/mongoc_embedded/mongoc_embedded_test.cpp +++ b/src/mongo/embedded/mongoc_embedded/mongoc_embedded_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -52,6 +51,9 @@ #include "mongo/util/quick_exit.h" #include "mongo/util/signal_handlers_synchronous.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace moe = mongo::optionenvironment; mongo_embedded_v1_lib* global_lib_handle; diff --git a/src/mongo/embedded/replication_coordinator_embedded.cpp b/src/mongo/embedded/replication_coordinator_embedded.cpp index d0182bfce59..1e20d7cf362 100644 --- a/src/mongo/embedded/replication_coordinator_embedded.cpp +++ b/src/mongo/embedded/replication_coordinator_embedded.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/db/repl/repl_set_config.h" #include "mongo/embedded/not_implemented.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication + + namespace mongo { namespace embedded { diff --git a/src/mongo/embedded/service_entry_point_embedded.cpp b/src/mongo/embedded/service_entry_point_embedded.cpp index b02c13c8421..f2485cbd8dc 100644 --- a/src/mongo/embedded/service_entry_point_embedded.cpp +++ b/src/mongo/embedded/service_entry_point_embedded.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/embedded/periodic_runner_embedded.h" #include "mongo/transport/service_executor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/executor/async_multicaster.cpp b/src/mongo/executor/async_multicaster.cpp index c8c4096d7e0..c932d58a0dd 100644 --- a/src/mongo/executor/async_multicaster.cpp +++ b/src/mongo/executor/async_multicaster.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/stdx/condition_variable.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace executor { diff --git a/src/mongo/executor/async_request_executor.cpp b/src/mongo/executor/async_request_executor.cpp index 93b7867f262..53b9386b143 100644 --- a/src/mongo/executor/async_request_executor.cpp +++ b/src/mongo/executor/async_request_executor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kExecutor #include "mongo/executor/async_request_executor.h" @@ -37,6 +36,9 @@ #include "mongo/platform/compiler.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kExecutor + + namespace mongo { MONGO_FAIL_POINT_DEFINE(hangBeforeRunningAsyncRequestExecutorTask); diff --git a/src/mongo/executor/connection_pool.cpp b/src/mongo/executor/connection_pool.cpp index 5900f65a650..04152fc5bea 100644 --- a/src/mongo/executor/connection_pool.cpp +++ b/src/mongo/executor/connection_pool.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kConnectionPool #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/util/lru_cache.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kConnectionPool + + using namespace fmt::literals; // One interesting implementation note herein concerns how setup() and diff --git a/src/mongo/executor/connection_pool_tl.cpp b/src/mongo/executor/connection_pool_tl.cpp index e6917ff4342..34085785555 100644 --- a/src/mongo/executor/connection_pool_tl.cpp +++ b/src/mongo/executor/connection_pool_tl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kASIO #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/db/auth/authorization_manager.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kASIO + + namespace mongo { namespace executor { namespace connection_pool_tl { diff --git a/src/mongo/executor/egress_tag_closer_manager.cpp b/src/mongo/executor/egress_tag_closer_manager.cpp index 9ce2592061a..78311c9597c 100644 --- a/src/mongo/executor/egress_tag_closer_manager.cpp +++ b/src/mongo/executor/egress_tag_closer_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kExecutor #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/util/net/hostandport.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kExecutor + + namespace mongo { namespace executor { diff --git a/src/mongo/executor/mock_network_fixture.cpp b/src/mongo/executor/mock_network_fixture.cpp index 766397bd154..cd3fa278430 100644 --- a/src/mongo/executor/mock_network_fixture.cpp +++ b/src/mongo/executor/mock_network_fixture.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/executor/network_interface_mock.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace test { namespace mock { diff --git a/src/mongo/executor/mock_network_fixture_test.cpp b/src/mongo/executor/mock_network_fixture_test.cpp index 6db689cfe7e..ef3632fa59e 100644 --- a/src/mongo/executor/mock_network_fixture_test.cpp +++ b/src/mongo/executor/mock_network_fixture_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/executor/network_interface_integration_fixture.cpp b/src/mongo/executor/network_interface_integration_fixture.cpp index cc40fb415d8..5b83f351f2c 100644 --- a/src/mongo/executor/network_interface_integration_fixture.cpp +++ b/src/mongo/executor/network_interface_integration_fixture.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kASIO #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/unittest/integration_test.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kASIO + + namespace mongo { namespace executor { diff --git a/src/mongo/executor/network_interface_integration_test.cpp b/src/mongo/executor/network_interface_integration_test.cpp index fdf1ac6f8ba..4b750e8002e 100644 --- a/src/mongo/executor/network_interface_integration_test.cpp +++ b/src/mongo/executor/network_interface_integration_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -52,6 +51,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace executor { namespace { diff --git a/src/mongo/executor/network_interface_mock.cpp b/src/mongo/executor/network_interface_mock.cpp index 978e660027a..d639b14ade6 100644 --- a/src/mongo/executor/network_interface_mock.cpp +++ b/src/mongo/executor/network_interface_mock.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/util/str.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { namespace executor { diff --git a/src/mongo/executor/network_interface_perf_test.cpp b/src/mongo/executor/network_interface_perf_test.cpp index ca9c05bf3d4..cb260f65374 100644 --- a/src/mongo/executor/network_interface_perf_test.cpp +++ b/src/mongo/executor/network_interface_perf_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -51,6 +50,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace executor { namespace { diff --git a/src/mongo/executor/network_interface_thread_pool.cpp b/src/mongo/executor/network_interface_thread_pool.cpp index bc03820a173..151970b5fff 100644 --- a/src/mongo/executor/network_interface_thread_pool.cpp +++ b/src/mongo/executor/network_interface_thread_pool.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT mongo::logv2::LogComponent::kExecutor #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/util/destructor_guard.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT mongo::logv2::LogComponent::kExecutor + + namespace mongo { namespace executor { diff --git a/src/mongo/executor/network_interface_thread_pool_test.cpp b/src/mongo/executor/network_interface_thread_pool_test.cpp index 88a69a8b9fc..0048aa0e03a 100644 --- a/src/mongo/executor/network_interface_thread_pool_test.cpp +++ b/src/mongo/executor/network_interface_thread_pool_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/util/concurrency/thread_pool_test_common.h" #include "mongo/util/concurrency/thread_pool_test_fixture.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace { using namespace mongo; diff --git a/src/mongo/executor/network_interface_tl.cpp b/src/mongo/executor/network_interface_tl.cpp index 8e14bd1a849..ec4da0b474b 100644 --- a/src/mongo/executor/network_interface_tl.cpp +++ b/src/mongo/executor/network_interface_tl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kASIO #include "mongo/executor/network_interface_tl.h" @@ -47,6 +46,9 @@ #include "mongo/util/net/socket_utils.h" #include "mongo/util/testing_proctor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kASIO + + namespace mongo { namespace executor { diff --git a/src/mongo/executor/task_executor_cursor.cpp b/src/mongo/executor/task_executor_cursor.cpp index 46d1bd846b4..107ab6afe9b 100644 --- a/src/mongo/executor/task_executor_cursor.cpp +++ b/src/mongo/executor/task_executor_cursor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace executor { diff --git a/src/mongo/executor/task_executor_cursor_test.cpp b/src/mongo/executor/task_executor_cursor_test.cpp index 09d1a1c301b..8f8cb30fd7e 100644 --- a/src/mongo/executor/task_executor_cursor_test.cpp +++ b/src/mongo/executor/task_executor_cursor_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/unittest/bson_test_util.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace executor { namespace { diff --git a/src/mongo/executor/task_executor_test_common.cpp b/src/mongo/executor/task_executor_test_common.cpp index ecdae5eb5b1..43cc6687175 100644 --- a/src/mongo/executor/task_executor_test_common.cpp +++ b/src/mongo/executor/task_executor_test_common.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/util/clock_source_mock.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace executor { namespace { diff --git a/src/mongo/executor/thread_pool_mock.cpp b/src/mongo/executor/thread_pool_mock.cpp index c84a80224cc..e39520487ad 100644 --- a/src/mongo/executor/thread_pool_mock.cpp +++ b/src/mongo/executor/thread_pool_mock.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT mongo::logv2::LogComponent::kExecutor #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/executor/network_interface_mock.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT mongo::logv2::LogComponent::kExecutor + + namespace mongo { namespace executor { diff --git a/src/mongo/executor/thread_pool_task_executor.cpp b/src/mongo/executor/thread_pool_task_executor.cpp index d642252c7f5..957b25e7ced 100644 --- a/src/mongo/executor/thread_pool_task_executor.cpp +++ b/src/mongo/executor/thread_pool_task_executor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT mongo::logv2::LogComponent::kExecutor #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT mongo::logv2::LogComponent::kExecutor + + namespace mongo { namespace executor { diff --git a/src/mongo/executor/thread_pool_task_executor_integration_test.cpp b/src/mongo/executor/thread_pool_task_executor_integration_test.cpp index da4c078404b..4be1d073994 100644 --- a/src/mongo/executor/thread_pool_task_executor_integration_test.cpp +++ b/src/mongo/executor/thread_pool_task_executor_integration_test.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/unittest/integration_test.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace executor { namespace { diff --git a/src/mongo/idl/cluster_server_parameter_op_observer.cpp b/src/mongo/idl/cluster_server_parameter_op_observer.cpp index de195a75ab1..ffb27bdeae6 100644 --- a/src/mongo/idl/cluster_server_parameter_op_observer.cpp +++ b/src/mongo/idl/cluster_server_parameter_op_observer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/idl/cluster_server_parameter_op_observer.h" @@ -36,6 +35,9 @@ #include "mongo/db/dbdirectclient.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/idl/cluster_server_parameter_op_observer_test.cpp b/src/mongo/idl/cluster_server_parameter_op_observer_test.cpp index a55a88980c0..4f2c6d2f8c6 100644 --- a/src/mongo/idl/cluster_server_parameter_op_observer_test.cpp +++ b/src/mongo/idl/cluster_server_parameter_op_observer_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/idl/server_parameter.cpp b/src/mongo/idl/server_parameter.cpp index 59e1a41db10..874753135c0 100644 --- a/src/mongo/idl/server_parameter.cpp +++ b/src/mongo/idl/server_parameter.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/idl/server_parameter.h" @@ -36,6 +35,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/static_immortal.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { using namespace fmt::literals; using SPT = ServerParameterType; diff --git a/src/mongo/logv2/log_detail.cpp b/src/mongo/logv2/log_detail.cpp index 188ede8032a..d2a94fbcc90 100644 --- a/src/mongo/logv2/log_detail.cpp +++ b/src/mongo/logv2/log_detail.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/util/static_immortal.h" #include "mongo/util/testing_proctor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo::logv2::detail { namespace { GetTenantIDFn& getTenantID() { diff --git a/src/mongo/logv2/log_domain_global.cpp b/src/mongo/logv2/log_domain_global.cpp index 5f2c6469a10..c00d8f8cc9d 100644 --- a/src/mongo/logv2/log_domain_global.cpp +++ b/src/mongo/logv2/log_domain_global.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "log_domain_global.h" @@ -50,6 +49,9 @@ #include <boost/log/core.hpp> #include <boost/log/sinks.hpp> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo::logv2 { void LogDomainGlobal::ConfigurationOptions::makeDisabled() { diff --git a/src/mongo/logv2/log_manager.cpp b/src/mongo/logv2/log_manager.cpp index 8cc4dba7187..0a39ffb778e 100644 --- a/src/mongo/logv2/log_manager.cpp +++ b/src/mongo/logv2/log_manager.cpp @@ -29,7 +29,6 @@ #include "mongo/platform/basic.h" -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/logv2/log_manager.h" @@ -41,6 +40,9 @@ #include "mongo/logv2/log_domain_global.h" #include "mongo/logv2/log_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo::logv2 { struct LogManager::Impl { diff --git a/src/mongo/logv2/log_util.cpp b/src/mongo/logv2/log_util.cpp index 8013d8a328e..32769c0cea0 100644 --- a/src/mongo/logv2/log_util.cpp +++ b/src/mongo/logv2/log_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT mongo::logv2::LogComponent::kControl #include "mongo/logv2/log_util.h" @@ -38,6 +37,9 @@ #include <string> #include <vector> +#define MONGO_LOGV2_DEFAULT_COMPONENT mongo::logv2::LogComponent::kControl + + namespace mongo::logv2 { namespace { diff --git a/src/mongo/logv2/logv2_bm.cpp b/src/mongo/logv2/logv2_bm.cpp index 1154e0d2456..595ad2a128e 100644 --- a/src/mongo/logv2/logv2_bm.cpp +++ b/src/mongo/logv2/logv2_bm.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/logv2/component_settings_filter.h" #include "mongo/logv2/log.h" @@ -43,6 +42,8 @@ #include <boost/make_shared.hpp> #include <iostream> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + namespace mongo { namespace { diff --git a/src/mongo/logv2/logv2_options.cpp b/src/mongo/logv2/logv2_options.cpp index 05b786e8878..44cab60c1ff 100644 --- a/src/mongo/logv2/logv2_options.cpp +++ b/src/mongo/logv2/logv2_options.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/util/options_parser/startup_option_init.h" #include "mongo/util/options_parser/startup_options.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { void RedactEncryptedFields::append(OperationContext* opCtx, diff --git a/src/mongo/logv2/logv2_test.cpp b/src/mongo/logv2/logv2_test.cpp index 7102e720203..598099d691c 100644 --- a/src/mongo/logv2/logv2_test.cpp +++ b/src/mongo/logv2/logv2_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -70,6 +69,9 @@ #include <boost/property_tree/json_parser.hpp> #include <boost/property_tree/ptree.hpp> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo::logv2 { namespace { diff --git a/src/mongo/logv2/redaction.cpp b/src/mongo/logv2/redaction.cpp index 0b143ba39ae..f3ab4e41730 100644 --- a/src/mongo/logv2/redaction.cpp +++ b/src/mongo/logv2/redaction.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/logv2/logv2_options_gen.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/logv2/redaction_test.cpp b/src/mongo/logv2/redaction_test.cpp index dda840a4681..fe3d9f56b2f 100644 --- a/src/mongo/logv2/redaction_test.cpp +++ b/src/mongo/logv2/redaction_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/logv2/redaction.h" @@ -38,6 +37,9 @@ #include "mongo/logv2/log_util.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/platform/decimal128_bson_test.cpp b/src/mongo/platform/decimal128_bson_test.cpp index f0d0ffd506a..d9cc6a93181 100644 --- a/src/mongo/platform/decimal128_bson_test.cpp +++ b/src/mongo/platform/decimal128_bson_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/hex.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace { std::string initTestData(); const std::string testData = initTestData(); @@ -703,7 +705,7 @@ const std::string data2 = R"VOGON( "extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0000000000000000000000000E+6136\"}}" }, )VOGON"; -const std::string data3 = R"VOGON( +const std::string data3 = R"VOGON( { "description": "[decq620] fold-down full sequence", "bson": "18000000136400000000A1EDCCCE1BC2D300000000FE5F00", @@ -3460,7 +3462,7 @@ const std::string data12 = R"VOGON( "bson": "180000001364000A00000000000000000000000000FE5F00", "extjson": "{\"d\" : {\"$numberDecimal\" : \"1E+6112\"}}", "canonical_extjson": "{\"d\" : {\"$numberDecimal\" : \"1.0E+6112\"}}" - } + } ] })VOGON"; diff --git a/src/mongo/platform/random.cpp b/src/mongo/platform/random.cpp index 00c3cb2a068..1443e857719 100644 --- a/src/mongo/platform/random.cpp +++ b/src/mongo/platform/random.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -54,6 +53,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + #ifdef _WIN32 #define SECURE_RANDOM_BCRYPT #elif defined(__linux__) || defined(__sun) || defined(__APPLE__) || defined(__FreeBSD__) || \ diff --git a/src/mongo/platform/random_test.cpp b/src/mongo/platform/random_test.cpp index 5e7e843fc38..b87f6dbca31 100644 --- a/src/mongo/platform/random_test.cpp +++ b/src/mongo/platform/random_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include <set> #include <vector> @@ -37,6 +36,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { TEST(RandomTest, Seed1) { diff --git a/src/mongo/platform/shared_library_posix.cpp b/src/mongo/platform/shared_library_posix.cpp index 7566de47ec5..4d5499e4916 100644 --- a/src/mongo/platform/shared_library_posix.cpp +++ b/src/mongo/platform/shared_library_posix.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { SharedLibrary::~SharedLibrary() { diff --git a/src/mongo/platform/shared_library_windows.cpp b/src/mongo/platform/shared_library_windows.cpp index 2b0873d103b..7c6f4da4508 100644 --- a/src/mongo/platform/shared_library_windows.cpp +++ b/src/mongo/platform/shared_library_windows.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/util/str.h" #include "mongo/util/text.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { SharedLibrary::~SharedLibrary() { diff --git a/src/mongo/platform/source_location_test.cpp b/src/mongo/platform/source_location_test.cpp index f818d326344..53bf3c444b3 100644 --- a/src/mongo/platform/source_location_test.cpp +++ b/src/mongo/platform/source_location_test.cpp @@ -27,13 +27,15 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" #include "mongo/logv2/log.h" #include "mongo/platform/source_location_test.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/rpc/metadata/client_metadata.cpp b/src/mongo/rpc/metadata/client_metadata.cpp index 86d7230120e..f66941d803f 100644 --- a/src/mongo/rpc/metadata/client_metadata.cpp +++ b/src/mongo/rpc/metadata/client_metadata.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/util/testing_proctor.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { namespace { diff --git a/src/mongo/rpc/metadata/client_metadata_test.cpp b/src/mongo/rpc/metadata/client_metadata_test.cpp index becb3af5698..9d4c000abb9 100644 --- a/src/mongo/rpc/metadata/client_metadata_test.cpp +++ b/src/mongo/rpc/metadata/client_metadata_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/util/processinfo.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { constexpr auto kMetadataDoc = "client"_sd; diff --git a/src/mongo/rpc/op_legacy_integration_test.cpp b/src/mongo/rpc/op_legacy_integration_test.cpp index 6270fc745da..a999f4647dc 100644 --- a/src/mongo/rpc/op_legacy_integration_test.cpp +++ b/src/mongo/rpc/op_legacy_integration_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/client/dbclient_connection.h" #include "mongo/db/dbmessage.h" @@ -36,6 +35,9 @@ #include "mongo/unittest/integration_test.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/rpc/op_msg.cpp b/src/mongo/rpc/op_msg.cpp index d6a91c7a69d..f93aa859368 100644 --- a/src/mongo/rpc/op_msg.cpp +++ b/src/mongo/rpc/op_msg.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include <wiredtiger.h> #endif +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { namespace { diff --git a/src/mongo/rpc/op_msg_integration_test.cpp b/src/mongo/rpc/op_msg_integration_test.cpp index 6020a798ce1..fa54c979648 100644 --- a/src/mongo/rpc/op_msg_integration_test.cpp +++ b/src/mongo/rpc/op_msg_integration_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include <fmt/format.h> @@ -45,6 +44,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/rpc/op_msg_test.cpp b/src/mongo/rpc/op_msg_test.cpp index 514d38ebc32..ead4dbe1977 100644 --- a/src/mongo/rpc/op_msg_test.cpp +++ b/src/mongo/rpc/op_msg_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/rpc/op_msg_test.h" @@ -41,6 +40,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/hex.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace rpc { namespace test { diff --git a/src/mongo/rpc/rewrite_state_change_errors.cpp b/src/mongo/rpc/rewrite_state_change_errors.cpp index d5e31ce1982..7ee8621307c 100644 --- a/src/mongo/rpc/rewrite_state_change_errors.cpp +++ b/src/mongo/rpc/rewrite_state_change_errors.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/rpc/rewrite_state_change_errors.h" @@ -54,6 +53,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/static_immortal.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo::rpc { namespace { diff --git a/src/mongo/rpc/warn_deprecated_wire_ops.cpp b/src/mongo/rpc/warn_deprecated_wire_ops.cpp index 540e431cb8f..cbad96cdda5 100644 --- a/src/mongo/rpc/warn_deprecated_wire_ops.cpp +++ b/src/mongo/rpc/warn_deprecated_wire_ops.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/util/static_immortal.h" #include "mongo/util/synchronized_value.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { using namespace fmt::literals; diff --git a/src/mongo/s/append_raw_responses_test.cpp b/src/mongo/s/append_raw_responses_test.cpp index 9bbc161bfb1..528e8ba4876 100644 --- a/src/mongo/s/append_raw_responses_test.cpp +++ b/src/mongo/s/append_raw_responses_test.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/sharding_router_test_fixture.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/s/async_requests_sender.cpp b/src/mongo/s/async_requests_sender.cpp index 1fceefc428e..5c746049b3a 100644 --- a/src/mongo/s/async_requests_sender.cpp +++ b/src/mongo/s/async_requests_sender.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + using namespace fmt::literals; namespace mongo { diff --git a/src/mongo/s/balancer_configuration.cpp b/src/mongo/s/balancer_configuration.cpp index 5e84c4664b8..8ea18193190 100644 --- a/src/mongo/s/balancer_configuration.cpp +++ b/src/mongo/s/balancer_configuration.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/s/grid.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/catalog/sharding_catalog_client_impl.cpp b/src/mongo/s/catalog/sharding_catalog_client_impl.cpp index ce58dd777d1..8ac380c734d 100644 --- a/src/mongo/s/catalog/sharding_catalog_client_impl.cpp +++ b/src/mongo/s/catalog/sharding_catalog_client_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -77,6 +76,9 @@ #include "mongo/util/str.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { using repl::OpTime; diff --git a/src/mongo/s/catalog/sharding_catalog_client_test.cpp b/src/mongo/s/catalog/sharding_catalog_client_test.cpp index 9e313184570..6c5a6051d7b 100644 --- a/src/mongo/s/catalog/sharding_catalog_client_test.cpp +++ b/src/mongo/s/catalog/sharding_catalog_client_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -59,6 +58,9 @@ #include "mongo/stdx/future.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/catalog/sharding_catalog_write_retry_test.cpp b/src/mongo/s/catalog/sharding_catalog_write_retry_test.cpp index 1c3373993f6..1345dfa0d65 100644 --- a/src/mongo/s/catalog/sharding_catalog_write_retry_test.cpp +++ b/src/mongo/s/catalog/sharding_catalog_write_retry_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -55,6 +54,9 @@ #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/stdx/future.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/catalog/type_chunk.cpp b/src/mongo/s/catalog/type_chunk.cpp index a74bd9d879c..18c5cd63bb0 100644 --- a/src/mongo/s/catalog/type_chunk.cpp +++ b/src/mongo/s/catalog/type_chunk.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { const NamespaceString ChunkType::ConfigNS("config.chunks"); diff --git a/src/mongo/s/catalog_cache.cpp b/src/mongo/s/catalog_cache.cpp index e603710ca4c..4f074073fbf 100644 --- a/src/mongo/s/catalog_cache.cpp +++ b/src/mongo/s/catalog_cache.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #define LOGV2_FOR_CATALOG_REFRESH(ID, DLEVEL, MESSAGE, ...) \ LOGV2_DEBUG_OPTIONS( \ @@ -53,6 +52,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/catalog_cache_refresh_test.cpp b/src/mongo/s/catalog_cache_refresh_test.cpp index c958dec98fb..8df10d20a43 100644 --- a/src/mongo/s/catalog_cache_refresh_test.cpp +++ b/src/mongo/s/catalog_cache_refresh_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/s/database_version.h" #include "mongo/unittest/death_test.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/s/catalog_cache_test.cpp b/src/mongo/s/catalog_cache_test.cpp index be608cbb68c..bb22d6c0915 100644 --- a/src/mongo/s/catalog_cache_test.cpp +++ b/src/mongo/s/catalog_cache_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/s/stale_exception.h" #include "mongo/s/type_collection_common_types_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/s/chunk.cpp b/src/mongo/s/chunk.cpp index e59c9143ecf..4a944411695 100644 --- a/src/mongo/s/chunk.cpp +++ b/src/mongo/s/chunk.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/s/chunk_writes_tracker.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { ChunkInfo::ChunkInfo(const ChunkType& from) diff --git a/src/mongo/s/chunk_manager.cpp b/src/mongo/s/chunk_manager.cpp index c269d700f5e..92e54aa83bb 100644 --- a/src/mongo/s/chunk_manager.cpp +++ b/src/mongo/s/chunk_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/s/mongod_and_mongos_server_parameters_gen.h" #include "mongo/s/shard_invalidated_for_targeting_exception.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/chunk_manager_index_bounds_test.cpp b/src/mongo/s/chunk_manager_index_bounds_test.cpp index 154c774157d..11701f0525c 100644 --- a/src/mongo/s/chunk_manager_index_bounds_test.cpp +++ b/src/mongo/s/chunk_manager_index_bounds_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/s/shard_key_pattern.h" #include "mongo/s/sharding_router_test_fixture.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/s/chunk_manager_query_test.cpp b/src/mongo/s/chunk_manager_query_test.cpp index 7102c3c496b..c7a95b8020c 100644 --- a/src/mongo/s/chunk_manager_query_test.cpp +++ b/src/mongo/s/chunk_manager_query_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/s/chunk_manager.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/s/chunk_manager_targeter.cpp b/src/mongo/s/chunk_manager_targeter.cpp index bdb386420c6..6e6a6bf79e3 100644 --- a/src/mongo/s/chunk_manager_targeter.cpp +++ b/src/mongo/s/chunk_manager_targeter.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -60,6 +59,9 @@ #include "mongo/db/timeseries/timeseries_update_delete_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/chunk_writes_tracker.cpp b/src/mongo/s/chunk_writes_tracker.cpp index 91fd1d6e4df..426bbd2e5b8 100644 --- a/src/mongo/s/chunk_writes_tracker.cpp +++ b/src/mongo/s/chunk_writes_tracker.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/s/chunk_writes_tracker.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { uint64_t ChunkWritesTracker::clearBytesWritten() { diff --git a/src/mongo/s/client/shard.cpp b/src/mongo/s/client/shard.cpp index ac360694af4..a70391501b1 100644 --- a/src/mongo/s/client/shard.cpp +++ b/src/mongo/s/client/shard.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/s/client/shard.h" #include "mongo/s/client/shard_registry.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/client/shard_factory.cpp b/src/mongo/s/client/shard_factory.cpp index 9910eb7f6a4..d789aadf03c 100644 --- a/src/mongo/s/client/shard_factory.cpp +++ b/src/mongo/s/client/shard_factory.cpp @@ -27,8 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding - #include "mongo/platform/basic.h" @@ -41,6 +39,9 @@ #include "mongo/client/remote_command_targeter.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { ShardFactory::ShardFactory(BuildersMap&& builders, diff --git a/src/mongo/s/client/shard_registry.cpp b/src/mongo/s/client/shard_registry.cpp index d722a9116ec..d8211ec4c82 100644 --- a/src/mongo/s/client/shard_registry.cpp +++ b/src/mongo/s/client/shard_registry.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/util/str.h" #include "mongo/util/testing_proctor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/client/shard_remote.cpp b/src/mongo/s/client/shard_remote.cpp index b678c276510..01d7c466d02 100644 --- a/src/mongo/s/client/shard_remote.cpp +++ b/src/mongo/s/client/shard_remote.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/s/client/shard_remote.h" @@ -54,6 +53,9 @@ #include "mongo/util/str.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { using executor::RemoteCommandRequest; diff --git a/src/mongo/s/client/sharding_connection_hook.cpp b/src/mongo/s/client/sharding_connection_hook.cpp index 0a7374a240e..afeaca5ec50 100644 --- a/src/mongo/s/client/sharding_connection_hook.cpp +++ b/src/mongo/s/client/sharding_connection_hook.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { using std::string; diff --git a/src/mongo/s/cluster_commands_helpers.cpp b/src/mongo/s/cluster_commands_helpers.cpp index 5c0469ab245..7b4a24a03f6 100644 --- a/src/mongo/s/cluster_commands_helpers.cpp +++ b/src/mongo/s/cluster_commands_helpers.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -61,6 +60,9 @@ #include "mongo/s/transaction_router.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { void appendWriteConcernErrorDetailToCmdResponse(const ShardId& shardId, diff --git a/src/mongo/s/cluster_ddl.cpp b/src/mongo/s/cluster_ddl.cpp index a5a4c03b0e3..5010575774f 100644 --- a/src/mongo/s/cluster_ddl.cpp +++ b/src/mongo/s/cluster_ddl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace cluster { namespace { diff --git a/src/mongo/s/cluster_identity_loader.cpp b/src/mongo/s/cluster_identity_loader.cpp index 23bae6f23ff..b51d0854b90 100644 --- a/src/mongo/s/cluster_identity_loader.cpp +++ b/src/mongo/s/cluster_identity_loader.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/s/catalog/type_config_version.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/cluster_identity_loader_test.cpp b/src/mongo/s/cluster_identity_loader_test.cpp index b9f7ba1f029..7b93e4353f6 100644 --- a/src/mongo/s/cluster_identity_loader_test.cpp +++ b/src/mongo/s/cluster_identity_loader_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/stdx/future.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/cluster_write.cpp b/src/mongo/s/cluster_write.cpp index 441e8a19f6a..5c486358a54 100644 --- a/src/mongo/s/cluster_write.cpp +++ b/src/mongo/s/cluster_write.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/logv2/log.h" @@ -40,6 +39,9 @@ #include "mongo/s/chunk_manager_targeter.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace cluster { diff --git a/src/mongo/s/commands/cluster_abort_reshard_collection_cmd.cpp b/src/mongo/s/commands/cluster_abort_reshard_collection_cmd.cpp index b4aa1d91d28..0f1ca5c889f 100644 --- a/src/mongo/s/commands/cluster_abort_reshard_collection_cmd.cpp +++ b/src/mongo/s/commands/cluster_abort_reshard_collection_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/s/request_types/abort_reshard_collection_gen.h" #include "mongo/s/resharding/resharding_feature_flag_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_add_shard_cmd.cpp b/src/mongo/s/commands/cluster_add_shard_cmd.cpp index 011c978ee46..25831702d90 100644 --- a/src/mongo/s/commands/cluster_add_shard_cmd.cpp +++ b/src/mongo/s/commands/cluster_add_shard_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/s/request_types/add_shard_request_type.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_add_shard_to_zone_cmd.cpp b/src/mongo/s/commands/cluster_add_shard_to_zone_cmd.cpp index 3497363517b..5cdfd09fb33 100644 --- a/src/mongo/s/commands/cluster_add_shard_to_zone_cmd.cpp +++ b/src/mongo/s/commands/cluster_add_shard_to_zone_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/add_shard_to_zone_request_type.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_aggregate_test.cpp b/src/mongo/s/commands/cluster_aggregate_test.cpp index dfae0f183db..67002da94d8 100644 --- a/src/mongo/s/commands/cluster_aggregate_test.cpp +++ b/src/mongo/s/commands/cluster_aggregate_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/s/commands/cluster_command_test_fixture.h" #include "mongo/s/query/cluster_aggregate.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_balancer_collection_status_cmd.cpp b/src/mongo/s/commands/cluster_balancer_collection_status_cmd.cpp index d673be266a7..50e654f5008 100644 --- a/src/mongo/s/commands/cluster_balancer_collection_status_cmd.cpp +++ b/src/mongo/s/commands/cluster_balancer_collection_status_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -45,6 +44,8 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/balancer_collection_status_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_build_info.cpp b/src/mongo/s/commands/cluster_build_info.cpp index 309c1b1c3cd..4d1fa56e292 100644 --- a/src/mongo/s/commands/cluster_build_info.cpp +++ b/src/mongo/s/commands/cluster_build_info.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/util/future.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_cleanup_reshard_collection_cmd.cpp b/src/mongo/s/commands/cluster_cleanup_reshard_collection_cmd.cpp index 0601122e024..dd801c13139 100644 --- a/src/mongo/s/commands/cluster_cleanup_reshard_collection_cmd.cpp +++ b/src/mongo/s/commands/cluster_cleanup_reshard_collection_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/s/request_types/cleanup_reshard_collection_gen.h" #include "mongo/s/resharding/resharding_feature_flag_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_clear_jumbo_flag_cmd.cpp b/src/mongo/s/commands/cluster_clear_jumbo_flag_cmd.cpp index 87a742fee78..bf3a2017da2 100644 --- a/src/mongo/s/commands/cluster_clear_jumbo_flag_cmd.cpp +++ b/src/mongo/s/commands/cluster_clear_jumbo_flag_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_coll_stats_cmd.cpp b/src/mongo/s/commands/cluster_coll_stats_cmd.cpp index f85ae09aeb2..cc974d33213 100644 --- a/src/mongo/s/commands/cluster_coll_stats_cmd.cpp +++ b/src/mongo/s/commands/cluster_coll_stats_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_collection_mod_cmd.cpp b/src/mongo/s/commands/cluster_collection_mod_cmd.cpp index 73e968a618e..ecab8d581f3 100644 --- a/src/mongo/s/commands/cluster_collection_mod_cmd.cpp +++ b/src/mongo/s/commands/cluster_collection_mod_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_command_test_fixture.cpp b/src/mongo/s/commands/cluster_command_test_fixture.cpp index f18307d2169..c8a8a208237 100644 --- a/src/mongo/s/commands/cluster_command_test_fixture.cpp +++ b/src/mongo/s/commands/cluster_command_test_fixture.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/util/options_parser/startup_option_init.h" #include "mongo/util/tick_source_mock.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { void ClusterCommandTestFixture::setUp() { diff --git a/src/mongo/s/commands/cluster_commit_reshard_collection_cmd.cpp b/src/mongo/s/commands/cluster_commit_reshard_collection_cmd.cpp index b23f2eb3604..9bb2a58e163 100644 --- a/src/mongo/s/commands/cluster_commit_reshard_collection_cmd.cpp +++ b/src/mongo/s/commands/cluster_commit_reshard_collection_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/s/request_types/sharded_ddl_commands_gen.h" #include "mongo/s/resharding/resharding_feature_flag_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_configure_collection_balancing.cpp b/src/mongo/s/commands/cluster_configure_collection_balancing.cpp index 12d0082dbe7..2853641355f 100644 --- a/src/mongo/s/commands/cluster_configure_collection_balancing.cpp +++ b/src/mongo/s/commands/cluster_configure_collection_balancing.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/configure_collection_balancing_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_control_balancer_cmd.cpp b/src/mongo/s/commands/cluster_control_balancer_cmd.cpp index a4b2b2c9d48..c7ac1734bb8 100644 --- a/src/mongo/s/commands/cluster_control_balancer_cmd.cpp +++ b/src/mongo/s/commands/cluster_control_balancer_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_convert_to_capped_cmd.cpp b/src/mongo/s/commands/cluster_convert_to_capped_cmd.cpp index 8c657bc453f..1ca69f25b3c 100644 --- a/src/mongo/s/commands/cluster_convert_to_capped_cmd.cpp +++ b/src/mongo/s/commands/cluster_convert_to_capped_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_create_indexes_cmd.cpp b/src/mongo/s/commands/cluster_create_indexes_cmd.cpp index 8c4c8af8784..2487e4da680 100644 --- a/src/mongo/s/commands/cluster_create_indexes_cmd.cpp +++ b/src/mongo/s/commands/cluster_create_indexes_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/s/cluster_ddl.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_data_size_cmd.cpp b/src/mongo/s/commands/cluster_data_size_cmd.cpp index 7d645d1a51c..e2da01f2036 100644 --- a/src/mongo/s/commands/cluster_data_size_cmd.cpp +++ b/src/mongo/s/commands/cluster_data_size_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_delete_test.cpp b/src/mongo/s/commands/cluster_delete_test.cpp index 407ce5e78e2..aa8974aa84e 100644 --- a/src/mongo/s/commands/cluster_delete_test.cpp +++ b/src/mongo/s/commands/cluster_delete_test.cpp @@ -27,12 +27,14 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" #include "mongo/s/commands/cluster_command_test_fixture.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_distinct_cmd.cpp b/src/mongo/s/commands/cluster_distinct_cmd.cpp index cfb7b572e2c..07c814515f6 100644 --- a/src/mongo/s/commands/cluster_distinct_cmd.cpp +++ b/src/mongo/s/commands/cluster_distinct_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/s/transaction_router.h" #include "mongo/util/decimal_counter.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_distinct_test.cpp b/src/mongo/s/commands/cluster_distinct_test.cpp index 40f0226e820..55ec1fd0ab5 100644 --- a/src/mongo/s/commands/cluster_distinct_test.cpp +++ b/src/mongo/s/commands/cluster_distinct_test.cpp @@ -27,12 +27,14 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" #include "mongo/s/commands/cluster_command_test_fixture.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_drop_collection_cmd.cpp b/src/mongo/s/commands/cluster_drop_collection_cmd.cpp index e16f473ab3c..b28d250f21c 100644 --- a/src/mongo/s/commands/cluster_drop_collection_cmd.cpp +++ b/src/mongo/s/commands/cluster_drop_collection_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/s/request_types/sharded_ddl_commands_gen.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_drop_database_cmd.cpp b/src/mongo/s/commands/cluster_drop_database_cmd.cpp index 7eff991cf4c..9a05eed903f 100644 --- a/src/mongo/s/commands/cluster_drop_database_cmd.cpp +++ b/src/mongo/s/commands/cluster_drop_database_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/s/request_types/sharded_ddl_commands_gen.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_drop_indexes_cmd.cpp b/src/mongo/s/commands/cluster_drop_indexes_cmd.cpp index 28e3e74e7e4..91fb0ebc456 100644 --- a/src/mongo/s/commands/cluster_drop_indexes_cmd.cpp +++ b/src/mongo/s/commands/cluster_drop_indexes_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_enable_sharding_cmd.cpp b/src/mongo/s/commands/cluster_enable_sharding_cmd.cpp index f80a1694cd4..8e3d6dcef37 100644 --- a/src/mongo/s/commands/cluster_enable_sharding_cmd.cpp +++ b/src/mongo/s/commands/cluster_enable_sharding_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/db/auth/action_set.h" #include "mongo/db/auth/action_type.h" @@ -38,6 +37,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_filemd5_cmd.cpp b/src/mongo/s/commands/cluster_filemd5_cmd.cpp index d351a7be7a3..6dab7bcc3a8 100644 --- a/src/mongo/s/commands/cluster_filemd5_cmd.cpp +++ b/src/mongo/s/commands/cluster_filemd5_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp b/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp index 89c6a53fe81..d3951cf19f1 100644 --- a/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp +++ b/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -66,6 +65,9 @@ #include "mongo/s/would_change_owning_shard_exception.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_find_and_modify_test.cpp b/src/mongo/s/commands/cluster_find_and_modify_test.cpp index f0a44494591..be0d97ddb49 100644 --- a/src/mongo/s/commands/cluster_find_and_modify_test.cpp +++ b/src/mongo/s/commands/cluster_find_and_modify_test.cpp @@ -27,12 +27,14 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" #include "mongo/s/commands/cluster_command_test_fixture.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_get_cluster_parameter_cmd.cpp b/src/mongo/s/commands/cluster_get_cluster_parameter_cmd.cpp index 1058e6ebafd..f67b90c765b 100644 --- a/src/mongo/s/commands/cluster_get_cluster_parameter_cmd.cpp +++ b/src/mongo/s/commands/cluster_get_cluster_parameter_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_get_shard_version_cmd.cpp b/src/mongo/s/commands/cluster_get_shard_version_cmd.cpp index ac404436772..3f8d1068bf8 100644 --- a/src/mongo/s/commands/cluster_get_shard_version_cmd.cpp +++ b/src/mongo/s/commands/cluster_get_shard_version_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/db/auth/action_set.h" #include "mongo/db/auth/action_type.h" @@ -39,6 +38,9 @@ #include "mongo/s/database_version.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_hello_cmd.cpp b/src/mongo/s/commands/cluster_hello_cmd.cpp index 5600a29661d..a2368e3964f 100644 --- a/src/mongo/s/commands/cluster_hello_cmd.cpp +++ b/src/mongo/s/commands/cluster_hello_cmd.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -53,6 +52,9 @@ #include "mongo/util/net/socket_utils.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { // Hangs in the beginning of each hello command when set. diff --git a/src/mongo/s/commands/cluster_insert_test.cpp b/src/mongo/s/commands/cluster_insert_test.cpp index ff5fb075486..3284df2aa54 100644 --- a/src/mongo/s/commands/cluster_insert_test.cpp +++ b/src/mongo/s/commands/cluster_insert_test.cpp @@ -27,13 +27,15 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" #include "mongo/db/commands.h" #include "mongo/s/commands/cluster_command_test_fixture.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_kill_op.cpp b/src/mongo/s/commands/cluster_kill_op.cpp index 08047081c5d..90cfb4eda20 100644 --- a/src/mongo/s/commands/cluster_kill_op.cpp +++ b/src/mongo/s/commands/cluster_kill_op.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/s/grid.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_killoperations_cmd.cpp b/src/mongo/s/commands/cluster_killoperations_cmd.cpp index 4ca775e2235..e1923c71bf4 100644 --- a/src/mongo/s/commands/cluster_killoperations_cmd.cpp +++ b/src/mongo/s/commands/cluster_killoperations_cmd.cpp @@ -37,6 +37,7 @@ #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + namespace mongo { class ClusterKillOperationsCmd : public KillOperationsCmdBase<ClusterKillOperationsCmd> { diff --git a/src/mongo/s/commands/cluster_list_collections_cmd.cpp b/src/mongo/s/commands/cluster_list_collections_cmd.cpp index cb2b2a98813..fbc917e2e60 100644 --- a/src/mongo/s/commands/cluster_list_collections_cmd.cpp +++ b/src/mongo/s/commands/cluster_list_collections_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/query/store_possible_cursor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_list_indexes_cmd.cpp b/src/mongo/s/commands/cluster_list_indexes_cmd.cpp index 3ae4cea812b..aec78c0788b 100644 --- a/src/mongo/s/commands/cluster_list_indexes_cmd.cpp +++ b/src/mongo/s/commands/cluster_list_indexes_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/query/store_possible_cursor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_map_reduce_agg.cpp b/src/mongo/s/commands/cluster_map_reduce_agg.cpp index 52a61ab9325..2ea18a9500e 100644 --- a/src/mongo/s/commands/cluster_map_reduce_agg.cpp +++ b/src/mongo/s/commands/cluster_map_reduce_agg.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" #include "mongo/bson/bsonobj.h" @@ -53,6 +52,9 @@ #include "mongo/s/query/cluster_aggregation_planner.h" #include "mongo/s/query/cluster_cursor_manager.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { Rarely _sampler; diff --git a/src/mongo/s/commands/cluster_move_chunk_cmd.cpp b/src/mongo/s/commands/cluster_move_chunk_cmd.cpp index f60456d7510..d6d67be99a4 100644 --- a/src/mongo/s/commands/cluster_move_chunk_cmd.cpp +++ b/src/mongo/s/commands/cluster_move_chunk_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/s/request_types/move_range_request_gen.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_move_primary_cmd.cpp b/src/mongo/s/commands/cluster_move_primary_cmd.cpp index 896db1fdf8a..c24272ef7ac 100644 --- a/src/mongo/s/commands/cluster_move_primary_cmd.cpp +++ b/src/mongo/s/commands/cluster_move_primary_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/s/request_types/move_primary_gen.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { using std::string; diff --git a/src/mongo/s/commands/cluster_move_range_cmd.cpp b/src/mongo/s/commands/cluster_move_range_cmd.cpp index 9da355abd2f..5c7f6c8775e 100644 --- a/src/mongo/s/commands/cluster_move_range_cmd.cpp +++ b/src/mongo/s/commands/cluster_move_range_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/db/auth/action_type.h" #include "mongo/db/auth/authorization_session.h" @@ -35,6 +34,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/move_range_request_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_oplog_note_cmd.cpp b/src/mongo/s/commands/cluster_oplog_note_cmd.cpp index dc560e73123..1d4877ced9e 100644 --- a/src/mongo/s/commands/cluster_oplog_note_cmd.cpp +++ b/src/mongo/s/commands/cluster_oplog_note_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -44,6 +43,8 @@ #include "mongo/db/service_context.h" #include "mongo/s/cluster_commands_helpers.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + namespace mongo { diff --git a/src/mongo/s/commands/cluster_refine_collection_shard_key_cmd.cpp b/src/mongo/s/commands/cluster_refine_collection_shard_key_cmd.cpp index e1cfdb65d3e..78578a16e15 100644 --- a/src/mongo/s/commands/cluster_refine_collection_shard_key_cmd.cpp +++ b/src/mongo/s/commands/cluster_refine_collection_shard_key_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/db/auth/authorization_session.h" #include "mongo/db/commands.h" @@ -39,6 +38,9 @@ #include "mongo/s/request_types/sharded_ddl_commands_gen.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_remove_shard_cmd.cpp b/src/mongo/s/commands/cluster_remove_shard_cmd.cpp index 1690c48b79c..20eb7f1c525 100644 --- a/src/mongo/s/commands/cluster_remove_shard_cmd.cpp +++ b/src/mongo/s/commands/cluster_remove_shard_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_remove_shard_from_zone_cmd.cpp b/src/mongo/s/commands/cluster_remove_shard_from_zone_cmd.cpp index 708ec09345f..67e8b387eb8 100644 --- a/src/mongo/s/commands/cluster_remove_shard_from_zone_cmd.cpp +++ b/src/mongo/s/commands/cluster_remove_shard_from_zone_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/remove_shard_from_zone_request_type.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { using std::string; diff --git a/src/mongo/s/commands/cluster_rename_collection_cmd.cpp b/src/mongo/s/commands/cluster_rename_collection_cmd.cpp index d03f39d38c7..6a3fec1c4d2 100644 --- a/src/mongo/s/commands/cluster_rename_collection_cmd.cpp +++ b/src/mongo/s/commands/cluster_rename_collection_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_reshard_collection_cmd.cpp b/src/mongo/s/commands/cluster_reshard_collection_cmd.cpp index 165d88d4959..3a21438243e 100644 --- a/src/mongo/s/commands/cluster_reshard_collection_cmd.cpp +++ b/src/mongo/s/commands/cluster_reshard_collection_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/s/request_types/sharded_ddl_commands_gen.h" #include "mongo/s/resharding/resharding_feature_flag_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_rwc_defaults_commands.cpp b/src/mongo/s/commands/cluster_rwc_defaults_commands.cpp index 606608cc914..8db311e9c0b 100644 --- a/src/mongo/s/commands/cluster_rwc_defaults_commands.cpp +++ b/src/mongo/s/commands/cluster_rwc_defaults_commands.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_set_allow_migrations_cmd.cpp b/src/mongo/s/commands/cluster_set_allow_migrations_cmd.cpp index 0bf48de01d5..1f06a6b0008 100644 --- a/src/mongo/s/commands/cluster_set_allow_migrations_cmd.cpp +++ b/src/mongo/s/commands/cluster_set_allow_migrations_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/s/request_types/set_allow_migrations_gen.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_set_cluster_parameter_cmd.cpp b/src/mongo/s/commands/cluster_set_cluster_parameter_cmd.cpp index 32b304b903a..ee83a079b8f 100644 --- a/src/mongo/s/commands/cluster_set_cluster_parameter_cmd.cpp +++ b/src/mongo/s/commands/cluster_set_cluster_parameter_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_set_index_commit_quorum_cmd.cpp b/src/mongo/s/commands/cluster_set_index_commit_quorum_cmd.cpp index 8727a9da078..976bd8b6ba0 100644 --- a/src/mongo/s/commands/cluster_set_index_commit_quorum_cmd.cpp +++ b/src/mongo/s/commands/cluster_set_index_commit_quorum_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_set_user_write_block_mode_command.cpp b/src/mongo/s/commands/cluster_set_user_write_block_mode_command.cpp index e95ae7c5f16..becd9cf5177 100644 --- a/src/mongo/s/commands/cluster_set_user_write_block_mode_command.cpp +++ b/src/mongo/s/commands/cluster_set_user_write_block_mode_command.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/sharded_ddl_commands_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { namespace { class SetUserWriteBlockModeCommand final : public TypedCommand<SetUserWriteBlockModeCommand> { diff --git a/src/mongo/s/commands/cluster_shard_collection_cmd.cpp b/src/mongo/s/commands/cluster_shard_collection_cmd.cpp index 70fa815b574..0902a31d728 100644 --- a/src/mongo/s/commands/cluster_shard_collection_cmd.cpp +++ b/src/mongo/s/commands/cluster_shard_collection_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/s/cluster_ddl.h" #include "mongo/s/commands/shard_collection_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_split_cmd.cpp b/src/mongo/s/commands/cluster_split_cmd.cpp index 7693d3ccf22..ae3f80eda56 100644 --- a/src/mongo/s/commands/cluster_split_cmd.cpp +++ b/src/mongo/s/commands/cluster_split_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/s/grid.h" #include "mongo/s/shard_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_split_vector_cmd.cpp b/src/mongo/s/commands/cluster_split_vector_cmd.cpp index e9ae8ed3f6a..53ba3d3696f 100644 --- a/src/mongo/s/commands/cluster_split_vector_cmd.cpp +++ b/src/mongo/s/commands/cluster_split_vector_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_update_test.cpp b/src/mongo/s/commands/cluster_update_test.cpp index 53aee707522..c413f0e96e5 100644 --- a/src/mongo/s/commands/cluster_update_test.cpp +++ b/src/mongo/s/commands/cluster_update_test.cpp @@ -27,12 +27,14 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" #include "mongo/s/commands/cluster_command_test_fixture.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_update_zone_key_range_cmd.cpp b/src/mongo/s/commands/cluster_update_zone_key_range_cmd.cpp index 04b73e38245..6db8dac1aa4 100644 --- a/src/mongo/s/commands/cluster_update_zone_key_range_cmd.cpp +++ b/src/mongo/s/commands/cluster_update_zone_key_range_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/update_zone_key_range_request_type.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { using std::string; diff --git a/src/mongo/s/commands/cluster_user_management_commands.cpp b/src/mongo/s/commands/cluster_user_management_commands.cpp index 68e2a5f23ab..8d06123c231 100644 --- a/src/mongo/s/commands/cluster_user_management_commands.cpp +++ b/src/mongo/s/commands/cluster_user_management_commands.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAccessControl + + namespace mongo { using std::string; diff --git a/src/mongo/s/commands/cluster_validate_cmd.cpp b/src/mongo/s/commands/cluster_validate_cmd.cpp index 52285704516..ea3f4ca9e70 100644 --- a/src/mongo/s/commands/cluster_validate_cmd.cpp +++ b/src/mongo/s/commands/cluster_validate_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_validate_db_metadata_cmd.cpp b/src/mongo/s/commands/cluster_validate_db_metadata_cmd.cpp index f625f69bbc8..9af5f532a74 100644 --- a/src/mongo/s/commands/cluster_validate_db_metadata_cmd.cpp +++ b/src/mongo/s/commands/cluster_validate_db_metadata_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_validate_db_metadata_cmd_test.cpp b/src/mongo/s/commands/cluster_validate_db_metadata_cmd_test.cpp index 42b5ac919ba..dc8df15db03 100644 --- a/src/mongo/s/commands/cluster_validate_db_metadata_cmd_test.cpp +++ b/src/mongo/s/commands/cluster_validate_db_metadata_cmd_test.cpp @@ -27,12 +27,14 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" #include "mongo/s/commands/cluster_command_test_fixture.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_write_cmd.cpp b/src/mongo/s/commands/cluster_write_cmd.cpp index e35117313b4..ea84621cce9 100644 --- a/src/mongo/s/commands/cluster_write_cmd.cpp +++ b/src/mongo/s/commands/cluster_write_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/s/commands/cluster_write_cmd.h" @@ -58,6 +57,9 @@ #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/document_shard_key_update_test.cpp b/src/mongo/s/commands/document_shard_key_update_test.cpp index dcaf62de0db..385e2e0e0ed 100644 --- a/src/mongo/s/commands/document_shard_key_update_test.cpp +++ b/src/mongo/s/commands/document_shard_key_update_test.cpp @@ -27,8 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest - #include "mongo/platform/basic.h" @@ -38,6 +36,8 @@ #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + namespace mongo { namespace { diff --git a/src/mongo/s/commands/document_shard_key_update_util.cpp b/src/mongo/s/commands/document_shard_key_update_util.cpp index 2bff33fa82a..3ba58dca058 100644 --- a/src/mongo/s/commands/document_shard_key_update_util.cpp +++ b/src/mongo/s/commands/document_shard_key_update_util.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" #include "mongo/s/commands/document_shard_key_update_util.h" @@ -41,6 +40,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/flush_router_config_cmd.cpp b/src/mongo/s/commands/flush_router_config_cmd.cpp index d27b65a2c4d..a81f2832564 100644 --- a/src/mongo/s/commands/flush_router_config_cmd.cpp +++ b/src/mongo/s/commands/flush_router_config_cmd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/s/grid.h" #include "mongo/s/is_mongos.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/kill_sessions_remote.cpp b/src/mongo/s/commands/kill_sessions_remote.cpp index 3e588f0fa9d..571c0687fb8 100644 --- a/src/mongo/s/commands/kill_sessions_remote.cpp +++ b/src/mongo/s/commands/kill_sessions_remote.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/s/grid.h" #include "mongo/s/query/cluster_cursor_manager.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/commands/strategy.cpp b/src/mongo/s/commands/strategy.cpp index 777d24bf257..d765a90c5b9 100644 --- a/src/mongo/s/commands/strategy.cpp +++ b/src/mongo/s/commands/strategy.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -97,6 +96,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" #include "mongo/util/timer.h" + +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + namespace mongo { namespace { MONGO_FAIL_POINT_DEFINE(hangBeforeCheckingMongosShutdownInterrupt); diff --git a/src/mongo/s/config_server_catalog_cache_loader.cpp b/src/mongo/s/config_server_catalog_cache_loader.cpp index 989ecff4858..2fb23a43bf9 100644 --- a/src/mongo/s/config_server_catalog_cache_loader.cpp +++ b/src/mongo/s/config_server_catalog_cache_loader.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/s/catalog/sharding_catalog_client.h" #include "mongo/s/grid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { using CollectionAndChangedChunks = CatalogCacheLoader::CollectionAndChangedChunks; diff --git a/src/mongo/s/grid.cpp b/src/mongo/s/grid.cpp index b79de52aef5..e977983e49d 100644 --- a/src/mongo/s/grid.cpp +++ b/src/mongo/s/grid.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/s/grid.h" @@ -35,6 +34,9 @@ #include "mongo/s/balancer_configuration.h" #include "mongo/s/query/cluster_cursor_manager.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { const auto grid = ServiceContext::declareDecoration<Grid>(); diff --git a/src/mongo/s/load_balancer_support_test.cpp b/src/mongo/s/load_balancer_support_test.cpp index a5813346671..e49efff73f0 100644 --- a/src/mongo/s/load_balancer_support_test.cpp +++ b/src/mongo/s/load_balancer_support_test.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/s/load_balancer_support.h" @@ -40,6 +39,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/s/mongos_main.cpp b/src/mongo/s/mongos_main.cpp index 0504b714aec..39aca129b84 100644 --- a/src/mongo/s/mongos_main.cpp +++ b/src/mongo/s/mongos_main.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -127,6 +126,9 @@ #include "mongo/util/text.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { using logv2::LogComponent; diff --git a/src/mongo/s/mongos_options.cpp b/src/mongo/s/mongos_options.cpp index d333d1f7fc2..f0dcd596877 100644 --- a/src/mongo/s/mongos_options.cpp +++ b/src/mongo/s/mongos_options.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/util/options_parser/startup_options.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { MongosGlobalParams mongosGlobalParams; diff --git a/src/mongo/s/mongos_topology_coordinator.cpp b/src/mongo/s/mongos_topology_coordinator.cpp index d78aa14c764..a397d40f12f 100644 --- a/src/mongo/s/mongos_topology_coordinator.cpp +++ b/src/mongo/s/mongos_topology_coordinator.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/logv2/log.h" @@ -37,6 +36,9 @@ #include "mongo/s/mongos_topology_coordinator.h" #include "mongo/util/fail_point.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/s/mongos_topology_coordinator_test.cpp b/src/mongo/s/mongos_topology_coordinator_test.cpp index b9fc86d6fd5..12488d91379 100644 --- a/src/mongo/s/mongos_topology_coordinator_test.cpp +++ b/src/mongo/s/mongos_topology_coordinator_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/logv2/log.h" @@ -41,6 +40,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + using std::unique_ptr; namespace mongo { diff --git a/src/mongo/s/query/async_results_merger.cpp b/src/mongo/s/query/async_results_merger.cpp index 363e151fbfd..8aa7afd2b83 100644 --- a/src/mongo/s/query/async_results_merger.cpp +++ b/src/mongo/s/query/async_results_merger.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/s/catalog/type_shard.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { constexpr StringData AsyncResultsMerger::kSortKeyField; diff --git a/src/mongo/s/query/cluster_aggregate.cpp b/src/mongo/s/query/cluster_aggregate.cpp index 72f57512200..b990c1c9bfc 100644 --- a/src/mongo/s/query/cluster_aggregate.cpp +++ b/src/mongo/s/query/cluster_aggregate.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -83,6 +82,9 @@ #include "mongo/s/transaction_router.h" #include "mongo/util/net/socket_utils.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { constexpr unsigned ClusterAggregate::kMaxViewRetries; diff --git a/src/mongo/s/query/cluster_aggregation_planner.cpp b/src/mongo/s/query/cluster_aggregation_planner.cpp index 557ae2a55c6..710048b74da 100644 --- a/src/mongo/s/query/cluster_aggregation_planner.cpp +++ b/src/mongo/s/query/cluster_aggregation_planner.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -60,6 +59,9 @@ #include "mongo/s/shard_key_pattern.h" #include "mongo/s/transaction_router.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace cluster_aggregation_planner { diff --git a/src/mongo/s/query/cluster_client_cursor_mock.cpp b/src/mongo/s/query/cluster_client_cursor_mock.cpp index 567f3450499..a30b774defb 100644 --- a/src/mongo/s/query/cluster_client_cursor_mock.cpp +++ b/src/mongo/s/query/cluster_client_cursor_mock.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { ClusterClientCursorMock::ClusterClientCursorMock(boost::optional<LogicalSessionId> lsid, diff --git a/src/mongo/s/query/cluster_cursor_manager.cpp b/src/mongo/s/query/cluster_cursor_manager.cpp index 1209d709e22..5eaa7e05306 100644 --- a/src/mongo/s/query/cluster_cursor_manager.cpp +++ b/src/mongo/s/query/cluster_cursor_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/util/clock_source.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { diff --git a/src/mongo/s/query/cluster_find.cpp b/src/mongo/s/query/cluster_find.cpp index bd186639684..42b0b8154e5 100644 --- a/src/mongo/s/query/cluster_find.cpp +++ b/src/mongo/s/query/cluster_find.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -72,6 +71,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { diff --git a/src/mongo/s/query/establish_cursors.cpp b/src/mongo/s/query/establish_cursors.cpp index 82ec1df2809..5f64ebdfe2e 100644 --- a/src/mongo/s/query/establish_cursors.cpp +++ b/src/mongo/s/query/establish_cursors.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/s/multi_statement_transaction_requests_sender.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace { diff --git a/src/mongo/s/query/router_stage_limit.cpp b/src/mongo/s/query/router_stage_limit.cpp index 03b136b1807..e419e9a9874 100644 --- a/src/mongo/s/query/router_stage_limit.cpp +++ b/src/mongo/s/query/router_stage_limit.cpp @@ -27,12 +27,14 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" #include "mongo/s/query/router_stage_limit.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { RouterStageLimit::RouterStageLimit(OperationContext* opCtx, diff --git a/src/mongo/s/query/router_stage_mock.cpp b/src/mongo/s/query/router_stage_mock.cpp index a8fc25ae358..89934897556 100644 --- a/src/mongo/s/query/router_stage_mock.cpp +++ b/src/mongo/s/query/router_stage_mock.cpp @@ -27,12 +27,14 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" #include "mongo/s/query/router_stage_mock.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { void RouterStageMock::queueResult(const ClusterQueryResult& result) { diff --git a/src/mongo/s/query/router_stage_skip.cpp b/src/mongo/s/query/router_stage_skip.cpp index bf313f794bf..1fb09faaa63 100644 --- a/src/mongo/s/query/router_stage_skip.cpp +++ b/src/mongo/s/query/router_stage_skip.cpp @@ -27,12 +27,14 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" #include "mongo/s/query/router_stage_skip.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { RouterStageSkip::RouterStageSkip(OperationContext* opCtx, diff --git a/src/mongo/s/router.cpp b/src/mongo/s/router.cpp index dba40ad1137..cdcbcaa1ffb 100644 --- a/src/mongo/s/router.cpp +++ b/src/mongo/s/router.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/s/router.h" @@ -35,6 +34,9 @@ #include "mongo/s/grid.h" #include "mongo/s/stale_exception.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace sharding { namespace router { diff --git a/src/mongo/s/service_entry_point_mongos.cpp b/src/mongo/s/service_entry_point_mongos.cpp index f2d3cb2b0ad..ba084a9a4a7 100644 --- a/src/mongo/s/service_entry_point_mongos.cpp +++ b/src/mongo/s/service_entry_point_mongos.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include <memory> @@ -55,6 +54,9 @@ #include "mongo/s/query/cluster_cursor_manager.h" #include "mongo/s/transaction_router.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { namespace { diff --git a/src/mongo/s/session_catalog_router.cpp b/src/mongo/s/session_catalog_router.cpp index aef732d30b0..64d81ba4459 100644 --- a/src/mongo/s/session_catalog_router.cpp +++ b/src/mongo/s/session_catalog_router.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -36,6 +35,9 @@ #include "mongo/db/sessions_collection.h" #include "mongo/s/transaction_router.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { int RouterSessionCatalog::reapSessionsOlderThan(OperationContext* opCtx, diff --git a/src/mongo/s/shard_id.cpp b/src/mongo/s/shard_id.cpp index 43b4f355302..385e25de253 100644 --- a/src/mongo/s/shard_id.cpp +++ b/src/mongo/s/shard_id.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include <functional> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { const ShardId ShardId::kConfigServerId("config"); diff --git a/src/mongo/s/shard_util.cpp b/src/mongo/s/shard_util.cpp index ae5e1aa9a1b..475b726db71 100644 --- a/src/mongo/s/shard_util.cpp +++ b/src/mongo/s/shard_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/s/shard_key_pattern.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace shardutil { namespace { diff --git a/src/mongo/s/sharding_initialization.cpp b/src/mongo/s/sharding_initialization.cpp index 98129648e05..94ee8465ad1 100644 --- a/src/mongo/s/sharding_initialization.cpp +++ b/src/mongo/s/sharding_initialization.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -77,6 +76,9 @@ #include "mongo/util/net/socket_utils.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/sharding_task_executor.cpp b/src/mongo/s/sharding_task_executor.cpp index 721137f31c8..0dbfb54a762 100644 --- a/src/mongo/s/sharding_task_executor.cpp +++ b/src/mongo/s/sharding_task_executor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/s/transaction_router.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace executor { diff --git a/src/mongo/s/sharding_task_executor_pool_controller.cpp b/src/mongo/s/sharding_task_executor_pool_controller.cpp index d95a76a168f..4d8f536d61f 100644 --- a/src/mongo/s/sharding_task_executor_pool_controller.cpp +++ b/src/mongo/s/sharding_task_executor_pool_controller.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kConnectionPool #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/s/is_mongos.h" #include "mongo/s/sharding_task_executor_pool_controller.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kConnectionPool + + namespace mongo { namespace { diff --git a/src/mongo/s/sharding_task_executor_test.cpp b/src/mongo/s/sharding_task_executor_test.cpp index 0fd57004672..ac776832486 100644 --- a/src/mongo/s/sharding_task_executor_test.cpp +++ b/src/mongo/s/sharding_task_executor_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kExecutor #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/s/sharding_router_test_fixture.h" #include "mongo/s/sharding_task_executor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kExecutor + + namespace mongo { namespace { diff --git a/src/mongo/s/sharding_test_fixture_common.cpp b/src/mongo/s/sharding_test_fixture_common.cpp index f136cadc42c..7610e8017a2 100644 --- a/src/mongo/s/sharding_test_fixture_common.cpp +++ b/src/mongo/s/sharding_test_fixture_common.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/s/write_ops/batched_command_request.h" #include "mongo/s/write_ops/batched_command_response.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { using executor::NetworkTestEnv; diff --git a/src/mongo/s/sharding_uptime_reporter.cpp b/src/mongo/s/sharding_uptime_reporter.cpp index a12d4d84e73..011a1c6f74d 100644 --- a/src/mongo/s/sharding_uptime_reporter.cpp +++ b/src/mongo/s/sharding_uptime_reporter.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/util/str.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/s/stale_shard_version_helpers.cpp b/src/mongo/s/stale_shard_version_helpers.cpp index 50e63c1667e..f1a45a3d409 100644 --- a/src/mongo/s/stale_shard_version_helpers.cpp +++ b/src/mongo/s/stale_shard_version_helpers.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace shard_version_retry { diff --git a/src/mongo/s/stale_shard_version_helpers_test.cpp b/src/mongo/s/stale_shard_version_helpers_test.cpp index a30cfec8304..89a7c0d9d11 100644 --- a/src/mongo/s/stale_shard_version_helpers_test.cpp +++ b/src/mongo/s/stale_shard_version_helpers_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/s/transaction_router.cpp b/src/mongo/s/transaction_router.cpp index e81077d32d5..955fb56861e 100644 --- a/src/mongo/s/transaction_router.cpp +++ b/src/mongo/s/transaction_router.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction #include "mongo/platform/basic.h" @@ -62,6 +61,9 @@ #include "mongo/util/log_with_sampling.h" #include "mongo/util/net/socket_utils.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTransaction + + namespace mongo { namespace { diff --git a/src/mongo/s/transaction_router_test.cpp b/src/mongo/s/transaction_router_test.cpp index 94a57f1ac2d..addefae213c 100644 --- a/src/mongo/s/transaction_router_test.cpp +++ b/src/mongo/s/transaction_router_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -56,6 +55,9 @@ #include "mongo/util/net/socket_utils.h" #include "mongo/util/tick_source_mock.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/s/version_mongos.cpp b/src/mongo/s/version_mongos.cpp index 9ca7108e651..22f3ddcb594 100644 --- a/src/mongo/s/version_mongos.cpp +++ b/src/mongo/s/version_mongos.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/s/version_mongos.h" @@ -42,6 +41,9 @@ #include "mongo/util/debug_util.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { void logMongosVersionInfo(std::ostream* os) { diff --git a/src/mongo/s/write_ops/batch_write_exec.cpp b/src/mongo/s/write_ops/batch_write_exec.cpp index 2a580115aa7..c9e66460b2a 100644 --- a/src/mongo/s/write_ops/batch_write_exec.cpp +++ b/src/mongo/s/write_ops/batch_write_exec.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/s/write_ops/batch_write_op.h" #include "mongo/util/exit.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kSharding + + namespace mongo { namespace { diff --git a/src/mongo/scripting/engine.cpp b/src/mongo/scripting/engine.cpp index 49e920bdf69..25626290238 100644 --- a/src/mongo/scripting/engine.cpp +++ b/src/mongo/scripting/engine.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/util/file.h" #include "mongo/util/text.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { using std::set; diff --git a/src/mongo/scripting/mozjs/cursor_handle.cpp b/src/mongo/scripting/mozjs/cursor_handle.cpp index 083032bb75f..74bfd6c4dcf 100644 --- a/src/mongo/scripting/mozjs/cursor_handle.cpp +++ b/src/mongo/scripting/mozjs/cursor_handle.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/scripting/mozjs/scripting_util_gen.h" #include "mongo/scripting/mozjs/wrapconstrainedmethod.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace mozjs { diff --git a/src/mongo/scripting/mozjs/engine.cpp b/src/mongo/scripting/mozjs/engine.cpp index b4069e76ca2..8a6f75d9933 100644 --- a/src/mongo/scripting/mozjs/engine.cpp +++ b/src/mongo/scripting/mozjs/engine.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/scripting/mozjs/implscope.h" #include "mongo/scripting/mozjs/proxyscope.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace js { void DisableExtraThreads(); } diff --git a/src/mongo/scripting/mozjs/global.cpp b/src/mongo/scripting/mozjs/global.cpp index e8e8b57e040..7fe731e5a95 100644 --- a/src/mongo/scripting/mozjs/global.cpp +++ b/src/mongo/scripting/mozjs/global.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/scripting/mozjs/valuewriter.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace mozjs { diff --git a/src/mongo/scripting/mozjs/implscope.cpp b/src/mongo/scripting/mozjs/implscope.cpp index 5b84223a9df..3a00ad0759b 100644 --- a/src/mongo/scripting/mozjs/implscope.cpp +++ b/src/mongo/scripting/mozjs/implscope.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -61,6 +60,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + #if !defined(__has_feature) #define __has_feature(x) 0 #endif diff --git a/src/mongo/scripting/mozjs/jsthread.cpp b/src/mongo/scripting/mozjs/jsthread.cpp index 550a7db9c11..9e11c486d56 100644 --- a/src/mongo/scripting/mozjs/jsthread.cpp +++ b/src/mongo/scripting/mozjs/jsthread.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/stdx/thread.h" #include "mongo/util/stacktrace.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace mozjs { diff --git a/src/mongo/scripting/mozjs/session.cpp b/src/mongo/scripting/mozjs/session.cpp index 6819c1cbfce..61623822cba 100644 --- a/src/mongo/scripting/mozjs/session.cpp +++ b/src/mongo/scripting/mozjs/session.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -44,6 +43,9 @@ #include "mongo/scripting/mozjs/wrapconstrainedmethod.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace mozjs { diff --git a/src/mongo/scripting/mozjs/valuereader.cpp b/src/mongo/scripting/mozjs/valuereader.cpp index f2458fafe48..06853a26c06 100644 --- a/src/mongo/scripting/mozjs/valuereader.cpp +++ b/src/mongo/scripting/mozjs/valuereader.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/scripting/mozjs/objectwrapper.h" #include "mongo/util/base64.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery + + namespace mongo { namespace mozjs { diff --git a/src/mongo/shell/bench.cpp b/src/mongo/shell/bench.cpp index 3624bbb69bb..d0c02886304 100644 --- a/src/mongo/shell/bench.cpp +++ b/src/mongo/shell/bench.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -50,6 +49,9 @@ #include "mongo/util/timer.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/shell/kms_aws.cpp b/src/mongo/shell/kms_aws.cpp index c45f56482c7..493fc482d1c 100644 --- a/src/mongo/shell/kms_aws.cpp +++ b/src/mongo/shell/kms_aws.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include <kms_message/kms_message.h> @@ -49,6 +48,9 @@ #include "mongo/util/text.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/shell/kms_azure.cpp b/src/mongo/shell/kms_azure.cpp index f63519f9fb7..410961deb86 100644 --- a/src/mongo/shell/kms_azure.cpp +++ b/src/mongo/shell/kms_azure.cpp @@ -29,7 +29,6 @@ #include "kms_message/kms_request.h" #include "mongo/shell/kms_gen.h" -#define MONGO_LOGV2_DEFAULT_COMPONENT ::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/shell/kms_network.h" #include "mongo/util/net/hostandport.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/shell/kms_gcp.cpp b/src/mongo/shell/kms_gcp.cpp index c5c47b4507e..beb06ae9c89 100644 --- a/src/mongo/shell/kms_gcp.cpp +++ b/src/mongo/shell/kms_gcp.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/util/net/ssl_manager.h" #include "mongo/util/net/ssl_options.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/shell/kms_network.cpp b/src/mongo/shell/kms_network.cpp index dbf0c6b467e..6ff51892313 100644 --- a/src/mongo/shell/kms_network.cpp +++ b/src/mongo/shell/kms_network.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/shell/kms_gen.h" #include "mongo/util/text.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { void KMSNetworkConnection::connect(const HostAndPort& host) { diff --git a/src/mongo/shell/mongo_main.cpp b/src/mongo/shell/mongo_main.cpp index 4570170e9a7..dd9231caa27 100644 --- a/src/mongo/shell/mongo_main.cpp +++ b/src/mongo/shell/mongo_main.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -97,6 +96,9 @@ #include <unistd.h> #endif +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + using namespace std::literals::string_literals; namespace mongo { diff --git a/src/mongo/shell/shell_options.cpp b/src/mongo/shell/shell_options.cpp index 99af125890f..2c8fd8e2326 100644 --- a/src/mongo/shell/shell_options.cpp +++ b/src/mongo/shell/shell_options.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -53,6 +52,9 @@ #include "mongo/util/str.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { using std::cout; diff --git a/src/mongo/shell/shell_utils.cpp b/src/mongo/shell/shell_utils.cpp index 2ce36f9ada4..dd85320d2a1 100644 --- a/src/mongo/shell/shell_utils.cpp +++ b/src/mongo/shell/shell_utils.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -68,6 +67,9 @@ #include "mongo/util/text.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo::shell_utils { namespace { boost::filesystem::path getUserDir() { diff --git a/src/mongo/shell/shell_utils_extended.cpp b/src/mongo/shell/shell_utils_extended.cpp index a77c66f603d..b2064e26044 100644 --- a/src/mongo/shell/shell_utils_extended.cpp +++ b/src/mongo/shell/shell_utils_extended.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -53,6 +52,9 @@ #include "mongo/util/str.h" #include "mongo/util/text.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { using std::ifstream; diff --git a/src/mongo/shell/shell_utils_launcher.cpp b/src/mongo/shell/shell_utils_launcher.cpp index a649dca0ed3..6518ec284c0 100644 --- a/src/mongo/shell/shell_utils_launcher.cpp +++ b/src/mongo/shell/shell_utils_launcher.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -81,6 +80,9 @@ #include "mongo/util/text.h" #include "mongo/util/version/releases.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { using std::cout; diff --git a/src/mongo/tools/bridge.cpp b/src/mongo/tools/bridge.cpp index 6150bb2f77b..f1a7b33a0df 100644 --- a/src/mongo/tools/bridge.cpp +++ b/src/mongo/tools/bridge.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kBridge #include "mongo/platform/basic.h" @@ -65,6 +64,9 @@ #include "mongo/util/time_support.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kBridge + + namespace mongo { namespace { diff --git a/src/mongo/tools/mongobridge_options.cpp b/src/mongo/tools/mongobridge_options.cpp index 4432ba157f0..72dc1d0cf03 100644 --- a/src/mongo/tools/mongobridge_options.cpp +++ b/src/mongo/tools/mongobridge_options.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kBridge #include "mongo/tools/mongobridge_options.h" @@ -39,6 +38,9 @@ #include "mongo/platform/random.h" #include "mongo/util/options_parser/startup_options.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kBridge + + namespace mongo { MongoBridgeGlobalParams mongoBridgeGlobalParams; diff --git a/src/mongo/transport/asio_utils.cpp b/src/mongo/transport/asio_utils.cpp index 01ff620ee9e..092de3c4eba 100644 --- a/src/mongo/transport/asio_utils.cpp +++ b/src/mongo/transport/asio_utils.cpp @@ -27,12 +27,14 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/transport/asio_utils.h" #include "mongo/config.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo::transport { Status errorCodeToStatus(const std::error_code& ec) { diff --git a/src/mongo/transport/baton_asio_linux.cpp b/src/mongo/transport/baton_asio_linux.cpp index 69404e843a7..65a305ac4c2 100644 --- a/src/mongo/transport/baton_asio_linux.cpp +++ b/src/mongo/transport/baton_asio_linux.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include <sys/eventfd.h> @@ -43,6 +42,9 @@ #include "mongo/util/fail_point.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { namespace transport { namespace { diff --git a/src/mongo/transport/message_compressor_manager.cpp b/src/mongo/transport/message_compressor_manager.cpp index b6a60cdcebd..e59d249247b 100644 --- a/src/mongo/transport/message_compressor_manager.cpp +++ b/src/mongo/transport/message_compressor_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/transport/message_compressor_registry.h" #include "mongo/transport/session.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { namespace { diff --git a/src/mongo/transport/message_compressor_manager_test.cpp b/src/mongo/transport/message_compressor_manager_test.cpp index 24cff651933..cbb9a7378a4 100644 --- a/src/mongo/transport/message_compressor_manager_test.cpp +++ b/src/mongo/transport/message_compressor_manager_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/transport/message_compressor_zstd.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/transport/proxy_protocol_header_parser.cpp b/src/mongo/transport/proxy_protocol_header_parser.cpp index ab8053687dd..f2b674530e6 100644 --- a/src/mongo/transport/proxy_protocol_header_parser.cpp +++ b/src/mongo/transport/proxy_protocol_header_parser.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/transport/proxy_protocol_header_parser.h" @@ -47,6 +46,9 @@ #include "mongo/platform/endian.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo::transport { using namespace fmt::literals; diff --git a/src/mongo/transport/service_entry_point_impl.cpp b/src/mongo/transport/service_entry_point_impl.cpp index 20703e97721..1be3ba5618b 100644 --- a/src/mongo/transport/service_entry_point_impl.cpp +++ b/src/mongo/transport/service_entry_point_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/transport/service_entry_point_impl.h" @@ -50,6 +49,9 @@ #include <sys/resource.h> #endif +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + #if !defined(__has_feature) #define __has_feature(x) 0 #endif diff --git a/src/mongo/transport/service_executor.cpp b/src/mongo/transport/service_executor.cpp index 4ec30e50609..9814bfe1487 100644 --- a/src/mongo/transport/service_executor.cpp +++ b/src/mongo/transport/service_executor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/util/processinfo.h" #include "mongo/util/synchronized_value.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { namespace transport { namespace { diff --git a/src/mongo/transport/service_executor_fixed.cpp b/src/mongo/transport/service_executor_fixed.cpp index 42c38da055b..04990e1b9f1 100644 --- a/src/mongo/transport/service_executor_fixed.cpp +++ b/src/mongo/transport/service_executor_fixed.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kExecutor #include "mongo/transport/service_executor_fixed.h" @@ -41,6 +40,9 @@ #include "mongo/util/testing_proctor.h" #include "mongo/util/thread_safety_context.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kExecutor + + namespace mongo::transport { namespace { diff --git a/src/mongo/transport/service_executor_reserved.cpp b/src/mongo/transport/service_executor_reserved.cpp index e8745d9e5f7..cc80dab67d6 100644 --- a/src/mongo/transport/service_executor_reserved.cpp +++ b/src/mongo/transport/service_executor_reserved.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kExecutor #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/util/processinfo.h" #include "mongo/util/thread_safety_context.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kExecutor + + namespace mongo { namespace transport { namespace { diff --git a/src/mongo/transport/service_executor_synchronous.cpp b/src/mongo/transport/service_executor_synchronous.cpp index 96f32fbe175..9567d62df6e 100644 --- a/src/mongo/transport/service_executor_synchronous.cpp +++ b/src/mongo/transport/service_executor_synchronous.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kExecutor #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/transport/service_executor_utils.h" #include "mongo/util/thread_safety_context.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kExecutor + + namespace mongo { namespace transport { namespace { diff --git a/src/mongo/transport/service_executor_test.cpp b/src/mongo/transport/service_executor_test.cpp index 303063d22b1..df16f89bbb3 100644 --- a/src/mongo/transport/service_executor_test.cpp +++ b/src/mongo/transport/service_executor_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -55,6 +54,9 @@ #include <asio.hpp> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo::transport { namespace { diff --git a/src/mongo/transport/service_executor_utils.cpp b/src/mongo/transport/service_executor_utils.cpp index 7dcdb6cab8d..42ec7fcbf5f 100644 --- a/src/mongo/transport/service_executor_utils.cpp +++ b/src/mongo/transport/service_executor_utils.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include <sys/resource.h> #endif +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + #if !defined(__has_feature) #define __has_feature(x) 0 #endif diff --git a/src/mongo/transport/service_state_machine.cpp b/src/mongo/transport/service_state_machine.cpp index ce330e8b060..a66ed2f83b1 100644 --- a/src/mongo/transport/service_state_machine.cpp +++ b/src/mongo/transport/service_state_machine.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -62,6 +61,9 @@ #include "mongo/util/net/ssl_manager.h" #include "mongo/util/net/ssl_peer_info.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { namespace transport { namespace { diff --git a/src/mongo/transport/service_state_machine_test.cpp b/src/mongo/transport/service_state_machine_test.cpp index 8de9f16d587..b5f67d5fc6c 100644 --- a/src/mongo/transport/service_state_machine_test.cpp +++ b/src/mongo/transport/service_state_machine_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -58,6 +57,9 @@ #include "mongo/util/producer_consumer_queue.h" #include "mongo/util/tick_source_mock.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace transport { namespace { diff --git a/src/mongo/transport/session_asio.cpp b/src/mongo/transport/session_asio.cpp index 165d6639032..6f1dd7745f3 100644 --- a/src/mongo/transport/session_asio.cpp +++ b/src/mongo/transport/session_asio.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/transport/session_asio.h" @@ -38,6 +37,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/future_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo::transport { MONGO_FAIL_POINT_DEFINE(transportLayerASIOshortOpportunisticReadWrite); diff --git a/src/mongo/transport/transport_layer_asio.cpp b/src/mongo/transport/transport_layer_asio.cpp index e2fc9c5eb52..8e3f968cc84 100644 --- a/src/mongo/transport/transport_layer_asio.cpp +++ b/src/mongo/transport/transport_layer_asio.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -75,6 +74,9 @@ #include "mongo/transport/session_asio.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { namespace transport { diff --git a/src/mongo/transport/transport_layer_asio_integration_test.cpp b/src/mongo/transport/transport_layer_asio_integration_test.cpp index 9f6eafa21ad..1fd1c67de14 100644 --- a/src/mongo/transport/transport_layer_asio_integration_test.cpp +++ b/src/mongo/transport/transport_layer_asio_integration_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "asio.hpp" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/transport/transport_layer_asio_test.cpp b/src/mongo/transport/transport_layer_asio_test.cpp index ffdbed9fcef..4368507b133 100644 --- a/src/mongo/transport/transport_layer_asio_test.cpp +++ b/src/mongo/transport/transport_layer_asio_test.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/transport/transport_layer_asio.h" @@ -65,6 +64,9 @@ #include "mongo/util/time_support.h" #include "mongo/util/waitable.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/transport/transport_layer_manager.cpp b/src/mongo/transport/transport_layer_manager.cpp index 0605d2c6dbd..e37b3a60cfb 100644 --- a/src/mongo/transport/transport_layer_manager.cpp +++ b/src/mongo/transport/transport_layer_manager.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/util/net/ssl_types.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { namespace transport { diff --git a/src/mongo/unittest/assert_that_test.cpp b/src/mongo/unittest/assert_that_test.cpp index 01733f54b2f..27febc03fbe 100644 --- a/src/mongo/unittest/assert_that_test.cpp +++ b/src/mongo/unittest/assert_that_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" #include <functional> @@ -41,6 +40,8 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + namespace mongo::unittest::match { namespace { diff --git a/src/mongo/unittest/benchmark_main.cpp b/src/mongo/unittest/benchmark_main.cpp index 060ab6f0f60..a2ead85fc8e 100644 --- a/src/mongo/unittest/benchmark_main.cpp +++ b/src/mongo/unittest/benchmark_main.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -38,6 +37,8 @@ #include "mongo/logv2/log.h" #include "mongo/util/signal_handlers_synchronous.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + int main(int argc, char** argv) { ::mongo::clearSignalMask(); diff --git a/src/mongo/unittest/death_test.cpp b/src/mongo/unittest/death_test.cpp index 8365ed5f5cf..44c7b3abe4a 100644 --- a/src/mongo/unittest/death_test.cpp +++ b/src/mongo/unittest/death_test.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -60,6 +59,9 @@ #include "mongo/util/debugger.h" #include "mongo/util/quick_exit.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + #if defined(__has_feature) #if __has_feature(thread_sanitizer) #define TSAN_ENABLED_ diff --git a/src/mongo/unittest/golden_test.cpp b/src/mongo/unittest/golden_test.cpp index e14dff24419..678112feec2 100644 --- a/src/mongo/unittest/golden_test.cpp +++ b/src/mongo/unittest/golden_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include <boost/filesystem.hpp> #include <boost/iostreams/device/file_descriptor.hpp> @@ -46,6 +45,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/golden_test.h" #include "mongo/util/ctype.h" + +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + namespace mongo::unittest { namespace fs = ::boost::filesystem; diff --git a/src/mongo/unittest/integration_test_main.cpp b/src/mongo/unittest/integration_test_main.cpp index 892889228b9..d508b550c25 100644 --- a/src/mongo/unittest/integration_test_main.cpp +++ b/src/mongo/unittest/integration_test_main.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -56,6 +55,9 @@ #include "mongo/util/signal_handlers_synchronous.h" #include "mongo/util/testing_proctor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + using namespace mongo; namespace { diff --git a/src/mongo/unittest/temp_dir.cpp b/src/mongo/unittest/temp_dir.cpp index 88b274883f9..151250e8d65 100644 --- a/src/mongo/unittest/temp_dir.cpp +++ b/src/mongo/unittest/temp_dir.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -42,6 +41,8 @@ #include "mongo/util/options_parser/startup_options.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + namespace mongo { diff --git a/src/mongo/unittest/thread_assertion_monitor_test.cpp b/src/mongo/unittest/thread_assertion_monitor_test.cpp index f20257e2030..a2f179cf59c 100644 --- a/src/mongo/unittest/thread_assertion_monitor_test.cpp +++ b/src/mongo/unittest/thread_assertion_monitor_test.cpp @@ -27,13 +27,15 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/unittest/thread_assertion_monitor.h" #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo::unittest { namespace { diff --git a/src/mongo/unittest/unittest.cpp b/src/mongo/unittest/unittest.cpp index 219726d8b29..01bfb7c756f 100644 --- a/src/mongo/unittest/unittest.cpp +++ b/src/mongo/unittest/unittest.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -61,6 +60,9 @@ #include "mongo/util/timer.h" #include "mongo/util/version/releases.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo::unittest { namespace { diff --git a/src/mongo/unittest/unittest_test.cpp b/src/mongo/unittest/unittest_test.cpp index 59ebe3a5f50..ecb80f8bbb9 100644 --- a/src/mongo/unittest/unittest_test.cpp +++ b/src/mongo/unittest/unittest_test.cpp @@ -31,7 +31,6 @@ * Unit tests of the unittest framework itself. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -45,6 +44,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace { namespace stdx = mongo::stdx; diff --git a/src/mongo/util/alarm_test.cpp b/src/mongo/util/alarm_test.cpp index e5755ce15c9..d8466b94878 100644 --- a/src/mongo/util/alarm_test.cpp +++ b/src/mongo/util/alarm_test.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -37,6 +36,9 @@ #include "mongo/util/alarm_runner_background_thread.h" #include "mongo/util/clock_source_mock.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { TEST(AlarmScheduler, BasicSingleThread) { diff --git a/src/mongo/util/assert_util.cpp b/src/mongo/util/assert_util.cpp index ea2499a0f8d..07ab283fdb0 100644 --- a/src/mongo/util/assert_util.cpp +++ b/src/mongo/util/assert_util.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAssert #include "mongo/platform/basic.h" @@ -52,6 +51,9 @@ #include "mongo/util/stacktrace.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kAssert + + #define TRIPWIRE_ASSERTION_ID 4457000 #define STR(x) #x #define XSTR(x) STR(x) diff --git a/src/mongo/util/assert_util_test.cpp b/src/mongo/util/assert_util_test.cpp index d4740ea966e..8d2688eaacc 100644 --- a/src/mongo/util/assert_util_test.cpp +++ b/src/mongo/util/assert_util_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/config.h" #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/util/quick_exit.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/util/background.cpp b/src/mongo/util/background.cpp index d906db47e0a..ce5c3f86a9a 100644 --- a/src/mongo/util/background.cpp +++ b/src/mongo/util/background.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/util/str.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + + namespace mongo { namespace { diff --git a/src/mongo/util/background_thread_clock_source.cpp b/src/mongo/util/background_thread_clock_source.cpp index 132ef7c41f4..e32df9b8aa2 100644 --- a/src/mongo/util/background_thread_clock_source.cpp +++ b/src/mongo/util/background_thread_clock_source.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/util/concurrency/idle_thread_block.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { BackgroundThreadClockSource::BackgroundThreadClockSource(std::unique_ptr<ClockSource> clockSource, diff --git a/src/mongo/util/base64_test.cpp b/src/mongo/util/base64_test.cpp index 650877ed7ff..a4a3575c185 100644 --- a/src/mongo/util/base64_test.cpp +++ b/src/mongo/util/base64_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/util/base64.h" #include "mongo/util/hex.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/util/concurrency/spin_lock_test.cpp b/src/mongo/util/concurrency/spin_lock_test.cpp index 99c0c0467e7..da42e7773ef 100644 --- a/src/mongo/util/concurrency/spin_lock_test.cpp +++ b/src/mongo/util/concurrency/spin_lock_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/util/concurrency/spin_lock.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace { using mongo::SpinLock; diff --git a/src/mongo/util/concurrency/thread_name.cpp b/src/mongo/util/concurrency/thread_name.cpp index b5f81ea16cf..7f21b5bcc56 100644 --- a/src/mongo/util/concurrency/thread_name.cpp +++ b/src/mongo/util/concurrency/thread_name.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -57,6 +56,9 @@ #include "mongo/platform/atomic_word.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { using namespace fmt::literals; diff --git a/src/mongo/util/concurrency/thread_pool.cpp b/src/mongo/util/concurrency/thread_pool.cpp index 0b542eca8e3..f4597f27e4d 100644 --- a/src/mongo/util/concurrency/thread_pool.cpp +++ b/src/mongo/util/concurrency/thread_pool.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kExecutor #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/util/concurrency/thread_name.h" #include "mongo/util/hierarchical_acquisition.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kExecutor + + namespace mongo { namespace { diff --git a/src/mongo/util/concurrency/thread_pool_test.cpp b/src/mongo/util/concurrency/thread_pool_test.cpp index b1f45d09579..4f2a564b91e 100644 --- a/src/mongo/util/concurrency/thread_pool_test.cpp +++ b/src/mongo/util/concurrency/thread_pool_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/util/time_support.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace { using namespace mongo; using namespace fmt::literals; diff --git a/src/mongo/util/concurrency/thread_pool_test_common.cpp b/src/mongo/util/concurrency/thread_pool_test_common.cpp index d76525f0f03..9ffe8f5a920 100644 --- a/src/mongo/util/concurrency/thread_pool_test_common.cpp +++ b/src/mongo/util/concurrency/thread_pool_test_common.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/util/concurrency/thread_pool_interface.h" #include "mongo/util/concurrency/thread_pool_test_fixture.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/util/concurrency/ticketholder.cpp b/src/mongo/util/concurrency/ticketholder.cpp index fa413e52133..392f7146c3a 100644 --- a/src/mongo/util/concurrency/ticketholder.cpp +++ b/src/mongo/util/concurrency/ticketholder.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { TicketHolder::~TicketHolder() = default; diff --git a/src/mongo/util/concurrency/ticketholder_test.cpp b/src/mongo/util/concurrency/ticketholder_test.cpp index 5f0fed6769b..7a7db89c656 100644 --- a/src/mongo/util/concurrency/ticketholder_test.cpp +++ b/src/mongo/util/concurrency/ticketholder_test.cpp @@ -28,8 +28,6 @@ */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest - #include "mongo/platform/basic.h" #include "mongo/db/concurrency/locker_noop_client_observer.h" @@ -41,6 +39,9 @@ #include "mongo/util/concurrency/ticketholder.h" #include "mongo/util/tick_source_mock.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace { using namespace mongo; diff --git a/src/mongo/util/concurrency/with_lock_test.cpp b/src/mongo/util/concurrency/with_lock_test.cpp index 8541ff26b3f..75a85652574 100644 --- a/src/mongo/util/concurrency/with_lock_test.cpp +++ b/src/mongo/util/concurrency/with_lock_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include <iostream> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/util/ctype_test.cpp b/src/mongo/util/ctype_test.cpp index 55c122dfd6e..98fbea63def 100644 --- a/src/mongo/util/ctype_test.cpp +++ b/src/mongo/util/ctype_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/util/ctype.h" #include "mongo/util/hex.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo::ctype { namespace { diff --git a/src/mongo/util/decorable_test.cpp b/src/mongo/util/decorable_test.cpp index 52d7d0f8387..4b97ad91247 100644 --- a/src/mongo/util/decorable_test.cpp +++ b/src/mongo/util/decorable_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include <type_traits> @@ -35,6 +34,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/decorable.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/util/diagnostic_info.cpp b/src/mongo/util/diagnostic_info.cpp index bb65abd4a4a..eba04ab4c37 100644 --- a/src/mongo/util/diagnostic_info.cpp +++ b/src/mongo/util/diagnostic_info.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/util/hierarchical_acquisition.h" #include "mongo/util/interruptible.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + using namespace fmt::literals; namespace mongo { diff --git a/src/mongo/util/diagnostic_info_test.cpp b/src/mongo/util/diagnostic_info_test.cpp index 365f37ae9c1..6c1b72e2d6b 100644 --- a/src/mongo/util/diagnostic_info_test.cpp +++ b/src/mongo/util/diagnostic_info_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/util/diagnostic_info.h" @@ -38,6 +37,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/clock_source_mock.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { TEST(DiagnosticInfo, BasicSingleThread) { // set up serviceContext and clock source diff --git a/src/mongo/util/dns_query_test.cpp b/src/mongo/util/dns_query_test.cpp index cd3197c641e..8d51568f52e 100644 --- a/src/mongo/util/dns_query_test.cpp +++ b/src/mongo/util/dns_query_test.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include <algorithm> #include <iterator> @@ -35,6 +34,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/dns_query.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + using namespace std::literals::string_literals; namespace { diff --git a/src/mongo/util/exception_filter_win32.cpp b/src/mongo/util/exception_filter_win32.cpp index a78820335a5..8f91797b8d1 100644 --- a/src/mongo/util/exception_filter_win32.cpp +++ b/src/mongo/util/exception_filter_win32.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #ifdef _WIN32 @@ -49,6 +48,8 @@ #include "mongo/util/stacktrace_windows.h" #include "mongo/util/text.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + namespace mongo { namespace { diff --git a/src/mongo/util/executor_stats_test.cpp b/src/mongo/util/executor_stats_test.cpp index 59285351d3f..26858b76fc2 100644 --- a/src/mongo/util/executor_stats_test.cpp +++ b/src/mongo/util/executor_stats_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include <fmt/format.h> #include <functional> @@ -42,6 +41,9 @@ #include "mongo/util/clock_source_mock.h" #include "mongo/util/executor_stats.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { class ExecutorStatsTest : public unittest::Test { diff --git a/src/mongo/util/exit.cpp b/src/mongo/util/exit.cpp index 6334262ee36..6352fc1dd52 100644 --- a/src/mongo/util/exit.cpp +++ b/src/mongo/util/exit.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -43,6 +42,9 @@ #include "mongo/stdx/thread.h" #include "mongo/util/quick_exit.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/util/fail_point.cpp b/src/mongo/util/fail_point.cpp index f60a9591744..57e7276919f 100644 --- a/src/mongo/util/fail_point.cpp +++ b/src/mongo/util/fail_point.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" #include "mongo/util/fail_point.h" @@ -48,6 +47,9 @@ #include "mongo/util/fail_point_server_parameter_gen.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/util/fail_point_test.cpp b/src/mongo/util/fail_point_test.cpp index 5f97f341923..b302ae3b799 100644 --- a/src/mongo/util/fail_point_test.cpp +++ b/src/mongo/util/fail_point_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -51,6 +50,9 @@ #include "mongo/util/tick_source_mock.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + using mongo::BSONObj; using mongo::FailPoint; using mongo::FailPointEnableBlock; diff --git a/src/mongo/util/file.cpp b/src/mongo/util/file.cpp index 69570df96fa..faf296d54df 100644 --- a/src/mongo/util/file.cpp +++ b/src/mongo/util/file.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage #include "mongo/util/file.h" @@ -50,6 +49,9 @@ #include "mongo/util/str.h" #include "mongo/util/text.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kStorage + + namespace mongo { #if defined(_WIN32) diff --git a/src/mongo/util/heap_profiler.cpp b/src/mongo/util/heap_profiler.cpp index a7e3988392b..0f58c155c65 100644 --- a/src/mongo/util/heap_profiler.cpp +++ b/src/mongo/util/heap_profiler.cpp @@ -27,8 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault - #include "mongo/platform/basic.h" #include <algorithm> @@ -45,11 +43,15 @@ #include <gperftools/malloc_hook.h> #include <third_party/murmurhash3/MurmurHash3.h> -// for dlfcn.h and backtrace #if defined(_POSIX_VERSION) && defined(MONGO_CONFIG_HAVE_EXECINFO_BACKTRACE) - #include <dlfcn.h> #include <execinfo.h> +#endif + +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + +// for dlfcn.h and backtrace +#if defined(_POSIX_VERSION) && defined(MONGO_CONFIG_HAVE_EXECINFO_BACKTRACE) // // Sampling heap profiler diff --git a/src/mongo/util/invalidating_lru_cache_test.cpp b/src/mongo/util/invalidating_lru_cache_test.cpp index 4c304deb4ef..86c57508090 100644 --- a/src/mongo/util/invalidating_lru_cache_test.cpp +++ b/src/mongo/util/invalidating_lru_cache_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/util/future.h" #include "mongo/util/invalidating_lru_cache.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/util/latch_analyzer.cpp b/src/mongo/util/latch_analyzer.cpp index a77c21d847e..509d3aa7d8d 100644 --- a/src/mongo/util/latch_analyzer.cpp +++ b/src/mongo/util/latch_analyzer.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -49,6 +48,9 @@ #include "mongo/util/latch_analyzer.h" #include "mongo/util/testing_proctor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { using namespace fmt::literals; diff --git a/src/mongo/util/log_and_backoff.cpp b/src/mongo/util/log_and_backoff.cpp index e7b33729215..48f4be16704 100644 --- a/src/mongo/util/log_and_backoff.cpp +++ b/src/mongo/util/log_and_backoff.cpp @@ -27,13 +27,15 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/util/log_and_backoff.h" #include "mongo/logv2/log.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo::log_backoff_detail { void logAndBackoffImpl(size_t numAttempts) { diff --git a/src/mongo/util/log_with_sampling_test.cpp b/src/mongo/util/log_with_sampling_test.cpp index 4802b2860ce..88b3aebe91e 100644 --- a/src/mongo/util/log_with_sampling_test.cpp +++ b/src/mongo/util/log_with_sampling_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -38,6 +37,9 @@ #include "mongo/util/log_with_sampling.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/util/lru_cache_test.cpp b/src/mongo/util/lru_cache_test.cpp index 96804b4f19e..6e03bb7d15c 100644 --- a/src/mongo/util/lru_cache_test.cpp +++ b/src/mongo/util/lru_cache_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/lru_cache.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/util/net/hostname_canonicalization.cpp b/src/mongo/util/net/hostname_canonicalization.cpp index e43979b0711..42ce4270361 100644 --- a/src/mongo/util/net/hostname_canonicalization.cpp +++ b/src/mongo/util/net/hostname_canonicalization.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/text.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { StatusWith<std::vector<std::string>> getHostFQDNs(std::string hostName, diff --git a/src/mongo/util/net/network_interface_ssl_test.cpp b/src/mongo/util/net/network_interface_ssl_test.cpp index 46854c9faf9..fadbb694257 100644 --- a/src/mongo/util/net/network_interface_ssl_test.cpp +++ b/src/mongo/util/net/network_interface_ssl_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/net/ssl_options.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace executor { namespace { diff --git a/src/mongo/util/net/openssl_init.cpp b/src/mongo/util/net/openssl_init.cpp index 89e5a1c4498..827fe7833a4 100644 --- a/src/mongo/util/net/openssl_init.cpp +++ b/src/mongo/util/net/openssl_init.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include <stack> #include <vector> +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { namespace { diff --git a/src/mongo/util/net/private/ssl_expiration.cpp b/src/mongo/util/net/private/ssl_expiration.cpp index 83c9f8b4776..8ba42b85ed8 100644 --- a/src/mongo/util/net/private/ssl_expiration.cpp +++ b/src/mongo/util/net/private/ssl_expiration.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/util/net/private/ssl_expiration.h" @@ -36,6 +35,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { static const auto oneDay = Hours(24); diff --git a/src/mongo/util/net/sock.cpp b/src/mongo/util/net/sock.cpp index 9420f7d7946..30ac7044663 100644 --- a/src/mongo/util/net/sock.cpp +++ b/src/mongo/util/net/sock.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -70,6 +69,9 @@ #include "mongo/util/str.h" #include "mongo/util/winutil.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { using std::pair; diff --git a/src/mongo/util/net/sockaddr.cpp b/src/mongo/util/net/sockaddr.cpp index a3a0ae8753d..2b6d20ec865 100644 --- a/src/mongo/util/net/sockaddr.cpp +++ b/src/mongo/util/net/sockaddr.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -59,6 +58,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/itoa.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { namespace { constexpr int SOCK_FAMILY_UNKNOWN_ERROR = 13078; diff --git a/src/mongo/util/net/socket_utils.cpp b/src/mongo/util/net/socket_utils.cpp index f15bb3ca96b..e0d74e40986 100644 --- a/src/mongo/util/net/socket_utils.cpp +++ b/src/mongo/util/net/socket_utils.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -63,6 +62,9 @@ #include "mongo/util/str.h" #include "mongo/util/winutil.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { #if defined(_WIN32) diff --git a/src/mongo/util/net/ssl_manager.cpp b/src/mongo/util/net/ssl_manager.cpp index 2f4a6fb713f..1a9de937a6e 100644 --- a/src/mongo/util/net/ssl_manager.cpp +++ b/src/mongo/util/net/ssl_manager.cpp @@ -28,8 +28,6 @@ */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork - #include "mongo/platform/basic.h" #include "mongo/util/net/ssl_manager.h" @@ -57,6 +55,9 @@ #include "mongo/util/synchronized_value.h" #include "mongo/util/text.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { SSLManagerCoordinator* theSSLManagerCoordinator; diff --git a/src/mongo/util/net/ssl_manager_apple.cpp b/src/mongo/util/net/ssl_manager_apple.cpp index ec77dc17722..3e1e93b6780 100644 --- a/src/mongo/util/net/ssl_manager_apple.cpp +++ b/src/mongo/util/net/ssl_manager_apple.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -57,6 +56,9 @@ #include "mongo/util/net/ssl_parameters_gen.h" #include "mongo/util/net/ssl_peer_info.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + using asio::ssl::apple::CFUniquePtr; /* This API appears in the Security framework even though diff --git a/src/mongo/util/net/ssl_manager_openssl.cpp b/src/mongo/util/net/ssl_manager_openssl.cpp index 99448698abe..7911f015bf3 100644 --- a/src/mongo/util/net/ssl_manager_openssl.cpp +++ b/src/mongo/util/net/ssl_manager_openssl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -89,6 +88,9 @@ #include <openssl/ec.h> #endif +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + #if OPENSSL_VERSION_NUMBER < 0x1010100FL int SSL_CTX_set_ciphersuites(SSL_CTX*, const char*) { uasserted( diff --git a/src/mongo/util/net/ssl_manager_test.cpp b/src/mongo/util/net/ssl_manager_test.cpp index 1dd6585f7c1..a33d4571b14 100644 --- a/src/mongo/util/net/ssl_manager_test.cpp +++ b/src/mongo/util/net/ssl_manager_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include <fstream> @@ -49,6 +48,8 @@ #include "mongo/util/net/ssl/context_openssl.hpp" #endif +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + namespace mongo { namespace { diff --git a/src/mongo/util/net/ssl_manager_windows.cpp b/src/mongo/util/net/ssl_manager_windows.cpp index fbaa983b0fb..7979fb0a84b 100644 --- a/src/mongo/util/net/ssl_manager_windows.cpp +++ b/src/mongo/util/net/ssl_manager_windows.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -68,6 +67,9 @@ #include "mongo/util/text.h" #include "mongo/util/uuid.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { using transport::SSLConnectionContext; diff --git a/src/mongo/util/net/ssl_options_server.cpp b/src/mongo/util/net/ssl_options_server.cpp index 4612993df07..8636ea6eadd 100644 --- a/src/mongo/util/net/ssl_options_server.cpp +++ b/src/mongo/util/net/ssl_options_server.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include <openssl/ssl.h> #endif +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace moe = mongo::optionenvironment; using std::string; diff --git a/src/mongo/util/net/ssl_parameters.cpp b/src/mongo/util/net/ssl_parameters.cpp index b7a5ea78848..b1aeda31ef0 100644 --- a/src/mongo/util/net/ssl_parameters.cpp +++ b/src/mongo/util/net/ssl_parameters.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/util/net/ssl_options.h" #include "mongo/util/net/ssl_parameters_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kNetwork + + namespace mongo { namespace { diff --git a/src/mongo/util/ntservice.cpp b/src/mongo/util/ntservice.cpp index 1abef2bdb2b..435927a7c9f 100644 --- a/src/mongo/util/ntservice.cpp +++ b/src/mongo/util/ntservice.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #if defined(_WIN32) diff --git a/src/mongo/util/options_parser/options_parser.cpp b/src/mongo/util/options_parser/options_parser.cpp index 4146d5b63a0..17d13adac26 100644 --- a/src/mongo/util/options_parser/options_parser.cpp +++ b/src/mongo/util/options_parser/options_parser.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/util/options_parser/options_parser.h" @@ -71,6 +70,9 @@ #include "mongo/util/str.h" #include "mongo/util/text.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace optionenvironment { diff --git a/src/mongo/util/password.cpp b/src/mongo/util/password.cpp index 447cbd2ca13..08cb33c2819 100644 --- a/src/mongo/util/password.cpp +++ b/src/mongo/util/password.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/util/errno_util.h" #include "mongo/util/password_params_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { std::string askPassword() { diff --git a/src/mongo/util/perfctr_collect.cpp b/src/mongo/util/perfctr_collect.cpp index 0fe8926f7b1..4e075ca1021 100644 --- a/src/mongo/util/perfctr_collect.cpp +++ b/src/mongo/util/perfctr_collect.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/util/str.h" #include "mongo/util/text.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC + + namespace mongo { namespace { diff --git a/src/mongo/util/perfctr_collect_test.cpp b/src/mongo/util/perfctr_collect_test.cpp index 2b2a304c77f..35e8b885597 100644 --- a/src/mongo/util/perfctr_collect_test.cpp +++ b/src/mongo/util/perfctr_collect_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/bson/bsonobjbuilder.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/util/periodic_runner_impl.cpp b/src/mongo/util/periodic_runner_impl.cpp index 19bd133586a..66b4f152d3c 100644 --- a/src/mongo/util/periodic_runner_impl.cpp +++ b/src/mongo/util/periodic_runner_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/util/clock_source.h" #include "mongo/util/scopeguard.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { PeriodicRunnerImpl::PeriodicRunnerImpl(ServiceContext* svc, ClockSource* clockSource) diff --git a/src/mongo/util/platform_init.cpp b/src/mongo/util/platform_init.cpp index 967f8bfc86e..155a8add70e 100644 --- a/src/mongo/util/platform_init.cpp +++ b/src/mongo/util/platform_init.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/stacktrace.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + #ifdef _WIN32 namespace mongo { diff --git a/src/mongo/util/processinfo.cpp b/src/mongo/util/processinfo.cpp index 519aca8c2e1..d12ca3cf790 100644 --- a/src/mongo/util/processinfo.cpp +++ b/src/mongo/util/processinfo.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/util/processinfo_freebsd.cpp b/src/mongo/util/processinfo_freebsd.cpp index d13b0295e92..b57e9ff6c1a 100644 --- a/src/mongo/util/processinfo_freebsd.cpp +++ b/src/mongo/util/processinfo_freebsd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include <cstdlib> #include <string> @@ -47,6 +46,9 @@ #include "mongo/util/scopeguard.h" #include "processinfo.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { ProcessInfo::ProcessInfo(ProcessId pid) : _pid(pid) {} diff --git a/src/mongo/util/processinfo_linux.cpp b/src/mongo/util/processinfo_linux.cpp index 49b95e5093e..aa40d6c7bd7 100644 --- a/src/mongo/util/processinfo_linux.cpp +++ b/src/mongo/util/processinfo_linux.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -62,6 +61,9 @@ #include "mongo/util/ctype.h" #include "mongo/util/file.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + #define KLONG long #define KLF "l" diff --git a/src/mongo/util/processinfo_openbsd.cpp b/src/mongo/util/processinfo_openbsd.cpp index 40ad2fc1a70..09ef930501a 100644 --- a/src/mongo/util/processinfo_openbsd.cpp +++ b/src/mongo/util/processinfo_openbsd.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include <cstdlib> #include <string> @@ -46,6 +45,9 @@ #include "mongo/util/scopeguard.h" #include "processinfo.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { ProcessInfo::ProcessInfo(ProcessId pid) : _pid(pid) {} diff --git a/src/mongo/util/processinfo_osx.cpp b/src/mongo/util/processinfo_osx.cpp index cb42b570513..75797e44e54 100644 --- a/src/mongo/util/processinfo_osx.cpp +++ b/src/mongo/util/processinfo_osx.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -47,6 +46,9 @@ #include "mongo/bson/bsonobjbuilder.h" #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { ProcessInfo::ProcessInfo(ProcessId pid) : _pid(pid) {} diff --git a/src/mongo/util/processinfo_solaris.cpp b/src/mongo/util/processinfo_solaris.cpp index 5fbb815985c..de64cf46998 100644 --- a/src/mongo/util/processinfo_solaris.cpp +++ b/src/mongo/util/processinfo_solaris.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include <boost/filesystem.hpp> #include <boost/none.hpp> @@ -51,6 +50,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { /** diff --git a/src/mongo/util/processinfo_windows.cpp b/src/mongo/util/processinfo_windows.cpp index 214ef5643cd..3f4e5ba74f1 100644 --- a/src/mongo/util/processinfo_windows.cpp +++ b/src/mongo/util/processinfo_windows.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -40,6 +39,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/processinfo.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/util/procparser.cpp b/src/mongo/util/procparser.cpp index b69c81646f2..bbe212325ad 100644 --- a/src/mongo/util/procparser.cpp +++ b/src/mongo/util/procparser.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC #include "mongo/platform/basic.h" @@ -55,6 +54,9 @@ #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" #include "mongo/util/text.h" + +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kFTDC + namespace mongo { namespace { diff --git a/src/mongo/util/procparser_test.cpp b/src/mongo/util/procparser_test.cpp index e902360886f..08db075dbf7 100644 --- a/src/mongo/util/procparser_test.cpp +++ b/src/mongo/util/procparser_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -41,6 +40,9 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace procparser { diff --git a/src/mongo/util/progress_meter.cpp b/src/mongo/util/progress_meter.cpp index 630a6dd8bf6..72178f70c31 100644 --- a/src/mongo/util/progress_meter.cpp +++ b/src/mongo/util/progress_meter.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -35,6 +34,9 @@ #include "mongo/logv2/log.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { void ProgressMeter::reset(unsigned long long total, int secondsBetween, int checkInterval) { diff --git a/src/mongo/util/signal_handlers.cpp b/src/mongo/util/signal_handlers.cpp index c063600f5c8..065640b1857 100644 --- a/src/mongo/util/signal_handlers.cpp +++ b/src/mongo/util/signal_handlers.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -56,6 +55,9 @@ #include "mongo/util/signal_win32.h" #include "mongo/util/stacktrace.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { /* diff --git a/src/mongo/util/signal_handlers_synchronous.cpp b/src/mongo/util/signal_handlers_synchronous.cpp index 8f052ea134b..9a7bfb33d4f 100644 --- a/src/mongo/util/signal_handlers_synchronous.cpp +++ b/src/mongo/util/signal_handlers_synchronous.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -61,6 +60,9 @@ #include "mongo/util/static_immortal.h" #include "mongo/util/text.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/util/signal_handlers_synchronous_test.cpp b/src/mongo/util/signal_handlers_synchronous_test.cpp index 40e46c54a2a..39629adebbf 100644 --- a/src/mongo/util/signal_handlers_synchronous_test.cpp +++ b/src/mongo/util/signal_handlers_synchronous_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/signal_handlers_synchronous.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace { using namespace mongo; diff --git a/src/mongo/util/stacktrace.cpp b/src/mongo/util/stacktrace.cpp index b9b15b7410a..deb24ffe73c 100644 --- a/src/mongo/util/stacktrace.cpp +++ b/src/mongo/util/stacktrace.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/util/stacktrace.h" @@ -37,6 +36,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/ctype.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo::stack_trace_detail { namespace { diff --git a/src/mongo/util/stacktrace_libunwind_test.cpp b/src/mongo/util/stacktrace_libunwind_test.cpp index d145bf3e76e..364f0c4ea7d 100644 --- a/src/mongo/util/stacktrace_libunwind_test.cpp +++ b/src/mongo/util/stacktrace_libunwind_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -48,6 +47,9 @@ #include "mongo/util/stacktrace.h" #include "mongo/util/stacktrace_libunwind_test_functions.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { // Must be a named namespace so the functions we want to unwind through have external linkage. diff --git a/src/mongo/util/stacktrace_posix.cpp b/src/mongo/util/stacktrace_posix.cpp index 2bf807ed4ae..3ea5a1e0424 100644 --- a/src/mongo/util/stacktrace_posix.cpp +++ b/src/mongo/util/stacktrace_posix.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -81,6 +80,9 @@ #include <execinfo.h> #endif +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace stack_trace_detail { namespace { diff --git a/src/mongo/util/stacktrace_somap.cpp b/src/mongo/util/stacktrace_somap.cpp index 947114affae..53d4f8cdc26 100644 --- a/src/mongo/util/stacktrace_somap.cpp +++ b/src/mongo/util/stacktrace_somap.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" #include "mongo/util/stacktrace_somap.h" @@ -58,6 +57,9 @@ #include "mongo/util/str.h" #include "mongo/util/version.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + // Given `#define A aaa` and `#define B bbb`, `TOKEN_CAT(A, B)` evaluates to `aaabbb`. #define TOKEN_CAT(a, b) TOKEN_CAT_PRIMITIVE(a, b) #define TOKEN_CAT_PRIMITIVE(a, b) a##b diff --git a/src/mongo/util/stacktrace_test.cpp b/src/mongo/util/stacktrace_test.cpp index 2a9ad180c28..f747f7a12bf 100644 --- a/src/mongo/util/stacktrace_test.cpp +++ b/src/mongo/util/stacktrace_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -69,6 +68,9 @@ #include <unistd.h> #endif // __linux__ +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + // Needs to have linkage so we can test metadata. Needs to be extern // "C" so it doesn't get mangled so we can name it with EXPORT_SYMBOLS // in SConscript. diff --git a/src/mongo/util/stacktrace_threads.cpp b/src/mongo/util/stacktrace_threads.cpp index d7157d0e212..9af9905803f 100644 --- a/src/mongo/util/stacktrace_threads.cpp +++ b/src/mongo/util/stacktrace_threads.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand #include "mongo/util/stacktrace.h" @@ -60,6 +59,8 @@ #include "mongo/util/signal_handlers_synchronous.h" #include "mongo/util/stacktrace_somap.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kCommand + namespace mongo { namespace stack_trace_detail { diff --git a/src/mongo/util/stacktrace_windows.cpp b/src/mongo/util/stacktrace_windows.cpp index ad9dc61acc6..693b231a259 100644 --- a/src/mongo/util/stacktrace_windows.cpp +++ b/src/mongo/util/stacktrace_windows.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -61,6 +60,9 @@ #include "mongo/util/concurrency/mutex.h" #include "mongo/util/text.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/util/string_map_test.cpp b/src/mongo/util/string_map_test.cpp index 7b421d8eab2..702d683a722 100644 --- a/src/mongo/util/string_map_test.cpp +++ b/src/mongo/util/string_map_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/unittest/unittest.h" @@ -35,6 +34,9 @@ #include "mongo/util/string_map.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace { using namespace mongo; diff --git a/src/mongo/util/tcmalloc_server_status_section.cpp b/src/mongo/util/tcmalloc_server_status_section.cpp index 5e789289c35..b8627507d87 100644 --- a/src/mongo/util/tcmalloc_server_status_section.cpp +++ b/src/mongo/util/tcmalloc_server_status_section.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #ifdef _WIN32 #define NVALGRIND @@ -44,6 +43,9 @@ #include "mongo/transport/service_entry_point.h" #include "mongo/util/tcmalloc_parameters_gen.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { // TODO: Remove these implementations and the associated IDL definition in 4.3. diff --git a/src/mongo/util/testing_options.cpp b/src/mongo/util/testing_options.cpp index 32ca0896ef7..79359908fe2 100644 --- a/src/mongo/util/testing_options.cpp +++ b/src/mongo/util/testing_options.cpp @@ -27,13 +27,15 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/base/init.h" #include "mongo/logv2/log.h" #include "mongo/util/testing_options_gen.h" #include "mongo/util/testing_proctor.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/util/testing_proctor.cpp b/src/mongo/util/testing_proctor.cpp index 08c33257627..82bc8fffe2e 100644 --- a/src/mongo/util/testing_proctor.cpp +++ b/src/mongo/util/testing_proctor.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/util/testing_proctor.h" @@ -36,6 +35,9 @@ #include "mongo/util/assert_util.h" #include "mongo/util/static_immortal.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { TestingProctor& TestingProctor::instance() { diff --git a/src/mongo/util/thread_context_test.cpp b/src/mongo/util/thread_context_test.cpp index 1b0c60e6067..1e84009c33e 100644 --- a/src/mongo/util/thread_context_test.cpp +++ b/src/mongo/util/thread_context_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -42,6 +41,9 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/synchronized_value.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/util/time_support_test.cpp b/src/mongo/util/time_support_test.cpp index c90c7c64de1..4eee33b4988 100644 --- a/src/mongo/util/time_support_test.cpp +++ b/src/mongo/util/time_support_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include <cstdlib> #include <ctime> @@ -39,6 +38,9 @@ #include "mongo/util/errno_util.h" #include "mongo/util/time_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { namespace { diff --git a/src/mongo/util/tracing_support.cpp b/src/mongo/util/tracing_support.cpp index e3ee5b173ce..5ce6b4f6133 100644 --- a/src/mongo/util/tracing_support.cpp +++ b/src/mongo/util/tracing_support.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include <deque> @@ -40,6 +39,9 @@ #include "mongo/util/static_immortal.h" #include "mongo/util/system_clock_source.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/util/tracing_support_test.cpp b/src/mongo/util/tracing_support_test.cpp index 804069cf8e6..92e6d3b42df 100644 --- a/src/mongo/util/tracing_support_test.cpp +++ b/src/mongo/util/tracing_support_test.cpp @@ -26,7 +26,6 @@ * exception statement from all source files in the program, then also delete * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include <memory> @@ -38,6 +37,9 @@ #include "mongo/util/clock_source_mock.h" #include "mongo/util/tracing_support.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + /* * We use `NOLINT` throughout this file since usages of `TracerProvider` aren't meant to be used in * production, but we still wanted to be able to commit unit tests. diff --git a/src/mongo/util/version.cpp b/src/mongo/util/version.cpp index 046a003127c..f58a136d658 100644 --- a/src/mongo/util/version.cpp +++ b/src/mongo/util/version.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -55,6 +54,9 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/util/version_impl.cpp b/src/mongo/util/version_impl.cpp index d28459aae90..9645774a989 100644 --- a/src/mongo/util/version_impl.cpp +++ b/src/mongo/util/version_impl.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -39,6 +38,9 @@ #include "mongo/util/version_constants.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + + namespace mongo { namespace { diff --git a/src/mongo/watchdog/watchdog.cpp b/src/mongo/watchdog/watchdog.cpp index 1190097067e..438e482bfd4 100644 --- a/src/mongo/watchdog/watchdog.cpp +++ b/src/mongo/watchdog/watchdog.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl #include "mongo/platform/basic.h" @@ -54,6 +53,8 @@ #include "mongo/util/hex.h" #include "mongo/util/timer.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kControl + namespace mongo { diff --git a/src/mongo/watchdog/watchdog_mongod.cpp b/src/mongo/watchdog/watchdog_mongod.cpp index 07ad1c93f5e..617ec245bc6 100644 --- a/src/mongo/watchdog/watchdog_mongod.cpp +++ b/src/mongo/watchdog/watchdog_mongod.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault #include "mongo/platform/basic.h" @@ -51,6 +50,9 @@ #include "mongo/watchdog/watchdog_mongod_gen.h" #include "mongo/watchdog/watchdog_register.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kDefault + + namespace mongo { namespace { diff --git a/src/mongo/watchdog/watchdog_test.cpp b/src/mongo/watchdog/watchdog_test.cpp index 178fa9a3411..aa096f3dd09 100644 --- a/src/mongo/watchdog/watchdog_test.cpp +++ b/src/mongo/watchdog/watchdog_test.cpp @@ -27,7 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest #include "mongo/platform/basic.h" @@ -46,6 +45,9 @@ #include "mongo/util/clock_source_mock.h" #include "mongo/util/tick_source_mock.h" +#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kTest + + namespace mongo { class TestPeriodicThread : public WatchdogPeriodicThread { |