diff options
Diffstat (limited to 'src/mongo/client')
39 files changed, 115 insertions, 39 deletions
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); |