From 0f7625b5cdbc24ed0fce1e168059118cb025d869 Mon Sep 17 00:00:00 2001 From: Gabriel Russell Date: Thu, 20 Feb 2020 16:05:48 -0500 Subject: SERVER-45567 removing util/log.h where I can o converting some log lines that were missed o fixing some missing includes create mode 100644 src/mongo/transport/ismaster_metrics.cpp --- src/mongo/base/secure_allocator.cpp | 1 - src/mongo/base/status.cpp | 1 - src/mongo/bson/bson_validate_test.cpp | 1 - src/mongo/bson/bsonelement.cpp | 1 - src/mongo/bson/bsonobj.cpp | 1 - src/mongo/bson/bsonobjbuilder.cpp | 1 - src/mongo/bson/json.cpp | 1 - src/mongo/client/async_client.cpp | 1 - src/mongo/client/authenticate.cpp | 1 - src/mongo/client/connection_string_connect.cpp | 1 - src/mongo/client/dbclient_base.cpp | 1 - src/mongo/client/dbclient_connection.cpp | 1 - src/mongo/client/dbclient_cursor.cpp | 1 - src/mongo/client/dbclient_cursor_test.cpp | 1 - src/mongo/client/dbclient_rs.cpp | 1 - src/mongo/client/fetcher.cpp | 15 ++-- src/mongo/client/mongo_uri_test.cpp | 1 - .../client/remote_command_retry_scheduler.cpp | 1 - .../client/remote_command_retry_scheduler_test.cpp | 1 - src/mongo/client/remote_command_targeter_rs.cpp | 1 - src/mongo/client/replica_set_change_notifier.cpp | 1 - src/mongo/client/replica_set_monitor.cpp | 1 - src/mongo/client/replica_set_monitor_manager.cpp | 1 - src/mongo/client/replica_set_monitor_scan_test.cpp | 1 - src/mongo/client/sasl_client_authenticate_impl.cpp | 1 - src/mongo/client/sasl_sspi.cpp | 6 +- src/mongo/client/sdam/sdam_json_test_runner.cpp | 1 - src/mongo/client/sdam/server_description.cpp | 6 +- src/mongo/client/sdam/topology_description.cpp | 1 - .../client/sdam/topology_description_test.cpp | 1 - src/mongo/client/sdam/topology_listener_mock.cpp | 1 - src/mongo/client/sdam/topology_manager.cpp | 10 ++- src/mongo/client/sdam/topology_manager_test.cpp | 1 - src/mongo/client/sdam/topology_state_machine.cpp | 1 - src/mongo/client/server_ping_monitor.cpp | 1 - src/mongo/client/server_ping_monitor_test.cpp | 15 +++- src/mongo/crypto/mechanism_scram_test.cpp | 1 - src/mongo/crypto/symmetric_crypto.cpp | 1 - src/mongo/crypto/symmetric_crypto_openssl.cpp | 1 - src/mongo/crypto/symmetric_crypto_windows.cpp | 2 +- src/mongo/crypto/symmetric_key.cpp | 6 +- src/mongo/db/auth/action_set.cpp | 1 - src/mongo/db/auth/authorization_manager_impl.cpp | 1 - src/mongo/db/auth/authorization_session.cpp | 1 - src/mongo/db/auth/authorization_session_impl.cpp | 1 - .../db/auth/authz_manager_external_state_d.cpp | 1 - .../db/auth/authz_manager_external_state_local.cpp | 1 - .../authz_session_external_state_server_common.cpp | 1 - src/mongo/db/auth/resource_pattern.cpp | 1 - .../db/auth/sasl_authentication_session_test.cpp | 1 - src/mongo/db/auth/sasl_commands.cpp | 1 - src/mongo/db/auth/sasl_mechanism_registry.cpp | 1 - src/mongo/db/auth/sasl_options_init.cpp | 1 - .../db/auth/sasl_scram_server_conversation.cpp | 1 - src/mongo/db/auth/sasl_scram_test.cpp | 1 - src/mongo/db/auth/security_key.cpp | 1 - src/mongo/db/auth/user_cache_invalidator_job.cpp | 1 - src/mongo/db/auth/user_document_parser.cpp | 1 - src/mongo/db/catalog/coll_mod.cpp | 1 - src/mongo/db/catalog/collection_catalog.cpp | 1 - src/mongo/db/catalog/collection_compact.cpp | 1 - src/mongo/db/catalog/collection_impl.cpp | 1 - src/mongo/db/catalog/collection_validation.cpp | 1 - src/mongo/db/catalog/create_collection.cpp | 1 - src/mongo/db/catalog/database_holder_impl.cpp | 1 - src/mongo/db/catalog/database_impl.cpp | 1 - src/mongo/db/catalog/drop_collection.cpp | 1 - src/mongo/db/catalog/drop_database.cpp | 1 - src/mongo/db/catalog/drop_indexes.cpp | 1 - src/mongo/db/catalog/index_build_block.cpp | 1 - src/mongo/db/catalog/index_builds_manager.cpp | 1 - src/mongo/db/catalog/index_catalog_entry_impl.cpp | 1 - src/mongo/db/catalog/index_catalog_impl.cpp | 1 - src/mongo/db/catalog/index_consistency.cpp | 1 - src/mongo/db/catalog/index_key_validate.cpp | 8 +- src/mongo/db/catalog/index_timestamp_helper.cpp | 1 - src/mongo/db/catalog/multi_index_block.cpp | 1 - src/mongo/db/catalog/rename_collection.cpp | 1 - src/mongo/db/catalog/uncommitted_collections.cpp | 1 - src/mongo/db/catalog/validate_adaptor.cpp | 1 - src/mongo/db/catalog/validate_state.cpp | 1 - src/mongo/db/catalog/validate_state_test.cpp | 1 - src/mongo/db/catalog_raii_test.cpp | 1 - src/mongo/db/cloner.cpp | 1 - src/mongo/db/collection_index_builds_tracker.cpp | 5 +- src/mongo/db/collection_index_usage_tracker.cpp | 1 - src/mongo/db/commands.cpp | 1 - src/mongo/db/commands/apply_ops_cmd.cpp | 1 - src/mongo/db/commands/authentication_commands.cpp | 1 - src/mongo/db/commands/compact.cpp | 1 - src/mongo/db/commands/count_cmd.cpp | 1 - src/mongo/db/commands/create_indexes.cpp | 1 - src/mongo/db/commands/dbcheck.cpp | 1 - src/mongo/db/commands/dbcommands.cpp | 1 - src/mongo/db/commands/dbcommands_d.cpp | 1 - src/mongo/db/commands/dbhash.cpp | 1 - src/mongo/db/commands/distinct.cpp | 1 - src/mongo/db/commands/drop_connections_command.cpp | 1 - src/mongo/db/commands/drop_indexes.cpp | 1 - src/mongo/db/commands/fail_point_cmd.cpp | 1 - .../db/commands/feature_compatibility_version.cpp | 1 - src/mongo/db/commands/find_and_modify.cpp | 1 - src/mongo/db/commands/find_cmd.cpp | 1 - src/mongo/db/commands/fsync.cpp | 1 - src/mongo/db/commands/generic.cpp | 1 - src/mongo/db/commands/get_last_error.cpp | 1 - src/mongo/db/commands/getmore_cmd.cpp | 1 - src/mongo/db/commands/http_client.cpp | 1 - src/mongo/db/commands/index_filter_commands.cpp | 1 - .../kill_all_sessions_by_pattern_command.cpp | 1 - .../db/commands/kill_all_sessions_command.cpp | 1 - src/mongo/db/commands/kill_op.cpp | 1 - src/mongo/db/commands/kill_sessions_command.cpp | 1 - src/mongo/db/commands/map_reduce_out_options.cpp | 1 - src/mongo/db/commands/mr.cpp | 1 - src/mongo/db/commands/mr_common.cpp | 1 - src/mongo/db/commands/oplog_note.cpp | 1 - src/mongo/db/commands/plan_cache_clear_command.cpp | 33 +++++--- src/mongo/db/commands/resize_oplog.cpp | 1 - src/mongo/db/commands/run_aggregate.cpp | 1 - src/mongo/db/commands/rwc_defaults_commands.cpp | 1 - src/mongo/db/commands/server_status.cpp | 1 - .../set_feature_compatibility_version_command.cpp | 1 - .../commands/set_index_commit_quorum_command.cpp | 1 - src/mongo/db/commands/sleep_command.cpp | 1 - src/mongo/db/commands/test_commands.cpp | 1 - src/mongo/db/commands/traffic_recording_cmds.cpp | 1 - src/mongo/db/commands/txn_cmds.cpp | 1 - src/mongo/db/commands/user_management_commands.cpp | 1 - .../commands/user_management_commands_common.cpp | 1 - src/mongo/db/commands/validate.cpp | 1 - .../commands/vote_commit_index_build_command.cpp | 1 - src/mongo/db/commands/whats_my_sni_command.cpp | 1 - src/mongo/db/concurrency/d_concurrency.cpp | 1 - src/mongo/db/concurrency/d_concurrency_test.cpp | 1 - src/mongo/db/concurrency/deferred_writer.cpp | 1 - .../db/concurrency/flow_control_ticketholder.cpp | 1 - src/mongo/db/concurrency/lock_manager.cpp | 1 - src/mongo/db/concurrency/lock_state.cpp | 1 - src/mongo/db/concurrency/lock_state_test.cpp | 1 - .../db/concurrency/write_conflict_exception.cpp | 1 - src/mongo/db/cursor_manager.cpp | 1 - src/mongo/db/database_index_builds_tracker.cpp | 1 - src/mongo/db/db_raii.cpp | 1 - src/mongo/db/db_raii_test.cpp | 1 - src/mongo/db/dbdirectclient.cpp | 1 - src/mongo/db/dbhelpers.cpp | 1 - src/mongo/db/exec/cached_plan.cpp | 1 - src/mongo/db/exec/collection_scan.cpp | 1 - src/mongo/db/exec/delete.cpp | 1 - .../db/exec/document_value/document_value_test.cpp | 1 - src/mongo/db/exec/geo_near.cpp | 1 - .../db/exec/inclusion_projection_executor_test.cpp | 1 - src/mongo/db/exec/index_scan.cpp | 1 - src/mongo/db/exec/multi_plan.cpp | 1 - src/mongo/db/exec/projection.cpp | 1 - .../db/exec/projection_executor_builder_test.cpp | 1 - src/mongo/db/exec/shard_filter.cpp | 1 - src/mongo/db/exec/sort_key_generator.cpp | 1 - src/mongo/db/exec/stagedebug_cmd.cpp | 1 - src/mongo/db/exec/subplan.cpp | 1 - src/mongo/db/exec/trial_stage.cpp | 1 - src/mongo/db/exec/update_stage.cpp | 1 - src/mongo/db/exec/working_set_common.cpp | 1 + .../exhaust_cursor_currentop_integration_test.cpp | 1 - src/mongo/db/free_mon/free_mon_controller.cpp | 1 - src/mongo/db/free_mon/free_mon_controller_test.cpp | 1 - src/mongo/db/free_mon/free_mon_mongod.cpp | 1 - src/mongo/db/free_mon/free_mon_options.cpp | 1 - src/mongo/db/free_mon/free_mon_processor.cpp | 1 - src/mongo/db/ftdc/controller.cpp | 1 - src/mongo/db/ftdc/file_manager.cpp | 1 - src/mongo/db/ftdc/file_manager_test.cpp | 1 - src/mongo/db/ftdc/file_writer.cpp | 1 - src/mongo/db/ftdc/ftdc_mongos.cpp | 7 +- src/mongo/db/ftdc/ftdc_system_stats_windows.cpp | 1 - src/mongo/db/ftdc/util.cpp | 1 - src/mongo/db/fts/fts_index_format_test.cpp | 1 - src/mongo/db/geo/geoparser.cpp | 1 - src/mongo/db/geo/r2_region_coverer.cpp | 1 - src/mongo/db/geo/r2_region_coverer_test.cpp | 1 - src/mongo/db/index/2d_key_generator_test.cpp | 1 - src/mongo/db/index/btree_key_generator_test.cpp | 1 - src/mongo/db/index/duplicate_key_tracker.cpp | 1 - src/mongo/db/index/expression_keys_private.cpp | 1 - src/mongo/db/index/hash_key_generator_test.cpp | 1 - src/mongo/db/index/haystack_access_method.cpp | 1 - .../db/index/index_access_method_factory_impl.cpp | 1 - src/mongo/db/index/index_build_interceptor.cpp | 1 - src/mongo/db/index/index_descriptor.cpp | 1 - src/mongo/db/index/s2_access_method.cpp | 1 - src/mongo/db/index/s2_key_generator_test.cpp | 1 - src/mongo/db/index/skipped_record_tracker.cpp | 17 +++- src/mongo/db/index/wildcard_key_generator_test.cpp | 1 - src/mongo/db/index_build_entry_helpers.cpp | 1 - src/mongo/db/index_builds_coordinator.cpp | 14 ++-- src/mongo/db/index_builds_coordinator_mongod.cpp | 1 - src/mongo/db/introspect.cpp | 1 - src/mongo/db/keys_collection_client_direct.cpp | 1 - src/mongo/db/keys_collection_manager.cpp | 1 - src/mongo/db/kill_sessions_common.cpp | 1 - src/mongo/db/kill_sessions_local.cpp | 1 - src/mongo/db/log_process_details.cpp | 1 - src/mongo/db/logical_clock.cpp | 1 - src/mongo/db/logical_clock_test.cpp | 1 - .../db/logical_session_cache_factory_mongod.cpp | 1 - src/mongo/db/logical_time_validator.cpp | 1 - src/mongo/db/matcher/expression_geo.cpp | 6 +- src/mongo/db/matcher/rewrite_expr.cpp | 1 - src/mongo/db/op_observer_impl.cpp | 1 - src/mongo/db/operation_context.cpp | 1 - src/mongo/db/operation_killer.cpp | 1 - src/mongo/db/ops/parsed_delete.cpp | 1 - src/mongo/db/ops/update.cpp | 1 - src/mongo/db/ops/update_result.cpp | 1 - src/mongo/db/ops/write_ops_exec.cpp | 1 - ...iodic_runner_job_abort_expired_transactions.cpp | 1 - ...runner_job_decrease_snapshot_cache_pressure.cpp | 1 - .../db/pipeline/document_source_change_stream.cpp | 1 - .../document_source_change_stream_transform.cpp | 1 - .../pipeline/document_source_check_invalidate.cpp | 1 - src/mongo/db/pipeline/document_source_cursor.cpp | 1 - src/mongo/db/pipeline/document_source_exchange.cpp | 1 - .../db/pipeline/document_source_exchange_test.cpp | 1 - src/mongo/db/pipeline/document_source_geo_near.cpp | 1 - .../document_source_internal_shard_filter.cpp | 13 +-- .../document_source_lookup_change_pre_image.cpp | 1 - .../db/pipeline/document_source_match_test.cpp | 1 - src/mongo/db/pipeline/document_source_merge.cpp | 1 - src/mongo/db/pipeline/document_source_out.cpp | 1 - .../document_source_sample_from_random_cursor.cpp | 1 - .../db/pipeline/document_source_union_with.cpp | 4 +- src/mongo/db/pipeline/pipeline_d.cpp | 1 - .../common_mongod_process_interface.cpp | 7 +- .../process_interface/common_process_interface.cpp | 1 - .../shardsvr_process_interface.cpp | 1 - src/mongo/db/pipeline/resume_token_test.cpp | 1 - src/mongo/db/pipeline/sharded_agg_helpers.cpp | 1 - src/mongo/db/query/canonical_query.cpp | 1 - src/mongo/db/query/canonical_query_encoder.cpp | 17 ++-- src/mongo/db/query/collection_query_info.cpp | 1 - src/mongo/db/query/datetime/date_time_support.cpp | 1 - src/mongo/db/query/find.cpp | 1 - src/mongo/db/query/find_common.cpp | 1 - src/mongo/db/query/get_executor.cpp | 1 - src/mongo/db/query/index_bounds_builder.cpp | 1 - src/mongo/db/query/plan_cache.cpp | 1 - src/mongo/db/query/plan_enumerator.cpp | 1 - src/mongo/db/query/plan_executor_impl.cpp | 1 - src/mongo/db/query/plan_ranker.cpp | 1 - src/mongo/db/query/planner_access.cpp | 1 - src/mongo/db/query/planner_analysis.cpp | 1 - src/mongo/db/query/planner_ixselect.cpp | 1 - src/mongo/db/query/planner_wildcard_helpers.cpp | 1 - src/mongo/db/query/query_planner.cpp | 1 - src/mongo/db/query/query_planner_common.cpp | 3 +- src/mongo/db/query/query_planner_test_fixture.cpp | 1 - src/mongo/db/query/query_planner_test_lib.cpp | 6 +- src/mongo/db/read_concern_mongod.cpp | 1 - src/mongo/db/read_concern_test.cpp | 1 - src/mongo/db/read_write_concern_defaults.cpp | 1 - src/mongo/db/repair_database.cpp | 1 - src/mongo/db/repair_database_and_check_version.cpp | 1 - src/mongo/db/repl/all_database_cloner.cpp | 1 - src/mongo/db/repl/all_database_cloner_test.cpp | 1 - src/mongo/db/repl/apply_ops.cpp | 1 - src/mongo/db/repl/base_cloner.cpp | 1 - src/mongo/db/repl/bgsync.cpp | 1 - .../db/repl/check_quorum_for_config_change.cpp | 1 - src/mongo/db/repl/collection_bulk_loader_impl.cpp | 1 - src/mongo/db/repl/collection_cloner.cpp | 1 - .../repl/data_replicator_external_state_impl.cpp | 1 - src/mongo/db/repl/database_cloner.cpp | 1 - .../db/repl/drop_pending_collection_reaper.cpp | 1 - src/mongo/db/repl/idempotency_test.cpp | 1 - src/mongo/db/repl/initial_syncer.cpp | 1 - src/mongo/db/repl/insert_group.cpp | 1 - src/mongo/db/repl/member_data.cpp | 1 - src/mongo/db/repl/noop_writer.cpp | 1 - src/mongo/db/repl/oplog.cpp | 1 - src/mongo/db/repl/oplog_applier.cpp | 1 - src/mongo/db/repl/oplog_batcher.cpp | 1 - src/mongo/db/repl/oplog_buffer_collection.cpp | 1 - src/mongo/db/repl/oplog_entry.cpp | 2 +- src/mongo/db/repl/oplog_fetcher.cpp | 1 - src/mongo/db/repl/oplog_fetcher_mock.cpp | 1 - src/mongo/db/repl/repl_client_info.cpp | 1 - src/mongo/db/repl/repl_set_heartbeat_response.cpp | 1 - src/mongo/db/repl/repl_settings.cpp | 1 - .../repl/replication_consistency_markers_impl.cpp | 1 - ...replication_coordinator_external_state_impl.cpp | 1 - ...replication_coordinator_external_state_mock.cpp | 1 - src/mongo/db/repl/replication_coordinator_impl.cpp | 1 - .../repl/replication_coordinator_impl_elect_v1.cpp | 1 - src/mongo/db/repl/replication_info.cpp | 6 +- src/mongo/db/repl/replication_process.cpp | 1 - src/mongo/db/repl/replication_recovery_test.cpp | 1 - src/mongo/db/repl/reporter.cpp | 1 - src/mongo/db/repl/roll_back_local_operations.cpp | 1 - .../db/repl/roll_back_local_operations_test.cpp | 1 - src/mongo/db/repl/rollback_checker.cpp | 1 - src/mongo/db/repl/rollback_checker_test.cpp | 1 - src/mongo/db/repl/rollback_impl.cpp | 1 - src/mongo/db/repl/rollback_impl_test.cpp | 1 - src/mongo/db/repl/rs_rollback.cpp | 1 - src/mongo/db/repl/scatter_gather_runner.cpp | 1 - src/mongo/db/repl/session_update_tracker.cpp | 1 - .../db/repl/speculative_majority_read_info.cpp | 1 - src/mongo/db/repl/split_horizon.cpp | 1 - src/mongo/db/repl/storage_interface_impl.cpp | 1 - src/mongo/db/repl/storage_interface_mock.cpp | 1 - src/mongo/db/repl/sync_source_feedback.cpp | 1 - src/mongo/db/repl/sync_source_resolver.cpp | 1 - src/mongo/db/repl/task_runner.cpp | 1 - src/mongo/db/repl/topology_coordinator_v1_test.cpp | 1 - .../db/repl/topology_version_observer_test.cpp | 1 - .../db/repl/transaction_oplog_application.cpp | 1 - .../db/s/active_shard_collection_registry_test.cpp | 1 - src/mongo/db/s/add_shard_cmd.cpp | 1 - src/mongo/db/s/balancer/balancer.cpp | 1 - .../balancer_chunk_selection_policy_impl.cpp | 1 - src/mongo/db/s/balancer/balancer_policy.cpp | 1 - src/mongo/db/s/balancer/balancer_policy_test.cpp | 1 - .../db/s/balancer/cluster_statistics_impl.cpp | 1 - src/mongo/db/s/balancer/migration_manager.cpp | 1 - src/mongo/db/s/balancer/migration_test_fixture.h | 1 - .../db/s/balancer/scoped_migration_request.cpp | 1 - src/mongo/db/s/check_sharding_index_command.cpp | 1 - .../db/s/chunk_move_write_concern_options.cpp | 1 - src/mongo/db/s/chunk_splitter.cpp | 1 - src/mongo/db/s/cleanup_orphaned_cmd.cpp | 1 - src/mongo/db/s/clone_catalog_data_command.cpp | 1 - ...e_collection_options_from_primary_shard_cmd.cpp | 1 - src/mongo/db/s/collection_metadata.cpp | 1 - src/mongo/db/s/collection_sharding_runtime.cpp | 1 - src/mongo/db/s/collection_sharding_state.cpp | 1 - .../db/s/config/configsvr_add_shard_command.cpp | 1 - .../config/configsvr_add_shard_to_zone_command.cpp | 1 - ...onfigsvr_balancer_collection_status_command.cpp | 1 - .../config/configsvr_clear_jumbo_flag_command.cpp | 1 - .../configsvr_commit_chunk_migration_command.cpp | 1 - .../configsvr_commit_move_primary_command.cpp | 1 - .../config/configsvr_create_collection_command.cpp | 1 - .../s/config/configsvr_create_database_command.cpp | 1 - .../s/config/configsvr_drop_collection_command.cpp | 1 - .../s/config/configsvr_drop_database_command.cpp | 1 - .../s/config/configsvr_enable_sharding_command.cpp | 1 - .../db/s/config/configsvr_merge_chunk_command.cpp | 1 - .../db/s/config/configsvr_move_chunk_command.cpp | 1 - .../db/s/config/configsvr_move_primary_command.cpp | 1 - ...nfigsvr_refine_collection_shard_key_command.cpp | 1 - .../db/s/config/configsvr_remove_shard_command.cpp | 1 - .../configsvr_remove_shard_from_zone_command.cpp | 1 - .../config/configsvr_shard_collection_command.cpp | 1 - .../db/s/config/configsvr_split_chunk_command.cpp | 1 - .../configsvr_update_zone_key_range_command.cpp | 1 - src/mongo/db/s/config/initial_split_policy.cpp | 1 - .../db/s/config/initial_split_policy_test.cpp | 1 - src/mongo/db/s/config/namespace_serializer.cpp | 1 - src/mongo/db/s/config/sharding_catalog_manager.cpp | 1 - .../sharding_catalog_manager_add_shard_test.cpp | 1 - .../sharding_catalog_manager_chunk_operations.cpp | 56 ++++++++----- ...rding_catalog_manager_collection_operations.cpp | 1 - ...ding_catalog_manager_create_collection_test.cpp | 1 - ...arding_catalog_manager_create_database_test.cpp | 1 - ...harding_catalog_manager_database_operations.cpp | 1 - ...arding_catalog_manager_enable_sharding_test.cpp | 1 - .../sharding_catalog_manager_remove_shard_test.cpp | 1 - ...rding_catalog_manager_shard_collection_test.cpp | 1 - .../sharding_catalog_manager_shard_operations.cpp | 1 - .../sharding_catalog_manager_zone_operations.cpp | 1 - src/mongo/db/s/database_sharding_state.cpp | 1 - .../db/s/flush_database_cache_updates_command.cpp | 1 - .../flush_routing_table_cache_updates_command.cpp | 1 - src/mongo/db/s/get_shard_version_command.cpp | 1 - src/mongo/db/s/merge_chunks_command.cpp | 1 - src/mongo/db/s/metadata_manager.cpp | 1 - .../db/s/migration_chunk_cloner_source_legacy.cpp | 1 - src/mongo/db/s/migration_coordinator.cpp | 83 ++++++++++++------ src/mongo/db/s/migration_destination_manager.cpp | 1 - ...gration_destination_manager_legacy_commands.cpp | 1 - src/mongo/db/s/migration_source_manager.cpp | 1 - src/mongo/db/s/migration_util.cpp | 9 +- src/mongo/db/s/move_chunk_command.cpp | 1 - src/mongo/db/s/move_primary_command.cpp | 1 - src/mongo/db/s/move_primary_source_manager.cpp | 1 - src/mongo/db/s/move_timing_helper.cpp | 1 - .../db/s/periodic_balancer_config_refresher.cpp | 1 - .../periodic_sharded_index_consistency_checker.cpp | 1 - src/mongo/db/s/range_deletion_util.cpp | 1 - ...coped_operation_completion_sharding_actions.cpp | 1 - .../db/s/session_catalog_migration_destination.cpp | 2 +- src/mongo/db/s/set_shard_version_command.cpp | 1 - .../db/s/shard_filtering_metadata_refresh.cpp | 1 - src/mongo/db/s/shard_metadata_util.cpp | 1 - src/mongo/db/s/shard_server_op_observer.cpp | 1 - src/mongo/db/s/sharded_connection_info.cpp | 1 - src/mongo/db/s/sharding_initialization_mongod.cpp | 1 - src/mongo/db/s/sharding_logging.cpp | 1 - src/mongo/db/s/sharding_logging_test.cpp | 1 - src/mongo/db/s/sharding_state.cpp | 1 - src/mongo/db/s/sharding_state_command.cpp | 1 - src/mongo/db/s/sharding_state_recovery.cpp | 1 - src/mongo/db/s/shardsvr_shard_collection.cpp | 1 - src/mongo/db/s/split_chunk.cpp | 1 - src/mongo/db/s/split_chunk_command.cpp | 1 - src/mongo/db/s/split_chunk_test.cpp | 1 - src/mongo/db/s/split_vector.cpp | 1 - src/mongo/db/s/transaction_coordinator_catalog.cpp | 1 - .../db/s/transaction_coordinator_futures_util.cpp | 1 - src/mongo/db/s/transaction_coordinator_service.cpp | 1 - .../db/s/transaction_coordinator_service_test.cpp | 1 - .../db/s/transaction_coordinator_test_fixture.cpp | 1 - src/mongo/db/s/transaction_coordinator_util.cpp | 1 - src/mongo/db/s/txn_two_phase_commit_cmds.cpp | 1 - src/mongo/db/s/unset_sharding_command.cpp | 1 - src/mongo/db/s/wait_for_majority_service.cpp | 1 - src/mongo/db/server_options_helpers.cpp | 1 - src/mongo/db/server_options_server_helpers.cpp | 1 - src/mongo/db/service_context.cpp | 1 - src/mongo/db/service_entry_point_mongod.cpp | 1 - src/mongo/db/service_liaison_mongod.cpp | 1 - src/mongo/db/service_liaison_mongos.cpp | 1 - src/mongo/db/session_catalog.cpp | 1 - src/mongo/db/session_catalog_mongod.cpp | 1 - src/mongo/db/sessions_collection_config_server.cpp | 1 - src/mongo/db/snapshot_window_util.cpp | 1 - src/mongo/db/sorter/sorter_test.cpp | 1 - src/mongo/db/startup_warnings_common.cpp | 1 - src/mongo/db/startup_warnings_mongod.cpp | 1 - src/mongo/db/stats/counters.cpp | 1 - src/mongo/db/stats/top.cpp | 1 - .../db/storage/biggie/biggie_record_store.cpp | 1 - .../db/storage/biggie/biggie_recovery_unit.cpp | 1 - src/mongo/db/storage/durable_catalog_impl.cpp | 1 - .../ephemeral_for_test_record_store.cpp | 1 - .../ephemeral_for_test_recovery_unit.cpp | 1 - src/mongo/db/storage/flow_control.cpp | 1 - src/mongo/db/storage/key_string.cpp | 1 - src/mongo/db/storage/key_string_bm.cpp | 1 - src/mongo/db/storage/key_string_test.cpp | 1 - .../db/storage/kv/kv_drop_pending_ident_reaper.cpp | 1 - .../db/storage/oplog_cap_maintainer_thread.cpp | 1 - src/mongo/db/storage/recovery_unit.cpp | 1 - src/mongo/db/storage/remove_saver.cpp | 1 - src/mongo/db/storage/storage_engine_init.cpp | 1 - .../db/storage/storage_engine_lock_file_posix.cpp | 1 - .../storage/storage_engine_lock_file_windows.cpp | 1 - src/mongo/db/storage/storage_engine_metadata.cpp | 1 - src/mongo/db/storage/storage_file_util.cpp | 1 - src/mongo/db/storage/storage_repair_observer.cpp | 1 - .../db/storage/storage_repair_observer_test.cpp | 1 - .../db/storage/storage_unittest_debug_util.cpp | 1 - .../wiredtiger_begin_transaction_block.cpp | 1 - .../db/storage/wiredtiger/wiredtiger_cursor.cpp | 1 - .../wiredtiger/wiredtiger_global_options.cpp | 1 - .../db/storage/wiredtiger/wiredtiger_init.cpp | 1 - .../wiredtiger/wiredtiger_kv_engine_test.cpp | 1 - .../wiredtiger/wiredtiger_oplog_manager.cpp | 1 - .../storage/wiredtiger/wiredtiger_parameters.cpp | 1 - .../wiredtiger/wiredtiger_prepare_conflict.cpp | 1 - .../wiredtiger/wiredtiger_session_cache.cpp | 1 - .../storage/wiredtiger/wiredtiger_size_storer.cpp | 1 - .../wiredtiger/wiredtiger_snapshot_manager.cpp | 1 - .../db/storage/wiredtiger/wiredtiger_util.cpp | 1 - src/mongo/db/system_index.cpp | 1 - src/mongo/db/ttl.cpp | 1 - src/mongo/db/views/durable_view_catalog.cpp | 1 - src/mongo/db/views/view_catalog.cpp | 1 - src/mongo/db/write_concern.cpp | 1 - src/mongo/dbtests/framework.cpp | 1 - src/mongo/dbtests/jsobjtests.cpp | 1 - src/mongo/dbtests/jsontests.cpp | 1 - src/mongo/dbtests/repltests.cpp | 1 - src/mongo/dbtests/storage_timestamp_tests.cpp | 1 - src/mongo/dbtests/threadedtests.cpp | 1 - .../dbtests/wildcard_multikey_persistence_test.cpp | 1 - .../embedded/index_builds_coordinator_embedded.cpp | 1 - .../mongoc_embedded/mongoc_embedded_test.cpp | 1 - src/mongo/executor/connection_pool_tl.cpp | 1 - src/mongo/executor/egress_tag_closer_manager.cpp | 1 - .../network_interface_integration_fixture.cpp | 1 - .../network_interface_integration_test.cpp | 1 - src/mongo/executor/network_interface_mock.cpp | 1 - src/mongo/executor/network_interface_perf_test.cpp | 1 - .../executor/network_interface_thread_pool.cpp | 1 - src/mongo/executor/network_interface_tl.cpp | 6 +- src/mongo/executor/task_executor_test_common.cpp | 6 +- src/mongo/executor/thread_pool_mock.cpp | 1 - src/mongo/executor/thread_pool_task_executor.cpp | 1 - src/mongo/idl/config_option_test.cpp | 1 - src/mongo/idl/server_parameter.cpp | 1 - src/mongo/logger/parse_log_component_settings.cpp | 1 - src/mongo/platform/decimal128_bson_test.cpp | 1 - src/mongo/platform/random.cpp | 1 - src/mongo/platform/random_test.cpp | 1 - src/mongo/platform/shared_library_posix.cpp | 1 - src/mongo/platform/shared_library_windows.cpp | 1 - src/mongo/platform/source_location_test.cpp | 1 - src/mongo/rpc/metadata/client_metadata.cpp | 1 - src/mongo/rpc/metadata/client_metadata_test.cpp | 1 - .../rpc/metadata/logical_time_metadata_test.cpp | 1 - src/mongo/rpc/op_msg.cpp | 1 - src/mongo/rpc/op_msg_integration_test.cpp | 1 - src/mongo/s/catalog/replset_dist_lock_manager.cpp | 1 - .../s/catalog/sharding_catalog_client_impl.cpp | 1 - src/mongo/s/catalog/sharding_catalog_test.cpp | 1 - .../catalog/sharding_catalog_write_retry_test.cpp | 1 - src/mongo/s/chunk_manager.cpp | 1 - src/mongo/s/chunk_manager_index_bounds_test.cpp | 1 - src/mongo/s/chunk_manager_query_test.cpp | 1 - src/mongo/s/client/shard.cpp | 1 - src/mongo/s/client/shard_connection.cpp | 1 - src/mongo/s/client/shard_factory.cpp | 1 - src/mongo/s/client/shard_registry.cpp | 1 - src/mongo/s/client/sharding_connection_hook.cpp | 1 - src/mongo/s/cluster_commands_helpers.cpp | 1 - src/mongo/s/cluster_identity_loader_test.cpp | 1 - src/mongo/s/cluster_last_error_info_test.cpp | 1 - src/mongo/s/commands/cluster_add_shard_cmd.cpp | 1 - .../s/commands/cluster_add_shard_to_zone_cmd.cpp | 1 - .../cluster_balancer_collection_status_cmd.cpp | 1 - .../s/commands/cluster_clear_jumbo_flag_cmd.cpp | 1 - src/mongo/s/commands/cluster_coll_stats_cmd.cpp | 1 - .../s/commands/cluster_collection_mod_cmd.cpp | 1 - .../s/commands/cluster_command_test_fixture.cpp | 1 - .../s/commands/cluster_create_indexes_cmd.cpp | 1 - src/mongo/s/commands/cluster_data_size_cmd.cpp | 1 - src/mongo/s/commands/cluster_delete_test.cpp | 1 - src/mongo/s/commands/cluster_distinct_test.cpp | 1 - src/mongo/s/commands/cluster_drop_database_cmd.cpp | 1 - src/mongo/s/commands/cluster_drop_indexes_cmd.cpp | 1 - .../s/commands/cluster_enable_sharding_cmd.cpp | 1 - src/mongo/s/commands/cluster_filemd5_cmd.cpp | 1 - .../s/commands/cluster_find_and_modify_test.cpp | 1 - .../s/commands/cluster_get_last_error_cmd.cpp | 1 - .../s/commands/cluster_get_shard_version_cmd.cpp | 1 - src/mongo/s/commands/cluster_insert_test.cpp | 1 - src/mongo/s/commands/cluster_is_master_cmd.cpp | 6 +- src/mongo/s/commands/cluster_kill_op.cpp | 1 - src/mongo/s/commands/cluster_move_chunk_cmd.cpp | 1 - src/mongo/s/commands/cluster_move_primary_cmd.cpp | 1 - .../cluster_refine_collection_shard_key_cmd.cpp | 1 - src/mongo/s/commands/cluster_remove_shard_cmd.cpp | 1 - .../cluster_remove_shard_from_zone_cmd.cpp | 1 - .../s/commands/cluster_rwc_defaults_commands.cpp | 1 - .../cluster_set_index_commit_quorum_cmd.cpp | 1 - .../s/commands/cluster_shard_collection_cmd.cpp | 1 - src/mongo/s/commands/cluster_split_cmd.cpp | 1 - src/mongo/s/commands/cluster_update_test.cpp | 1 - .../commands/cluster_update_zone_key_range_cmd.cpp | 1 - src/mongo/s/commands/cluster_write_cmd.cpp | 1 - src/mongo/s/commands/commands_public.cpp | 1 - .../s/commands/document_shard_key_update_test.cpp | 1 - .../s/commands/document_shard_key_update_util.cpp | 1 - src/mongo/s/commands/flush_router_config_cmd.cpp | 1 - src/mongo/s/commands/kill_sessions_remote.cpp | 1 - src/mongo/s/commands/strategy.cpp | 1 - src/mongo/s/config_server_catalog_cache_loader.cpp | 1 - src/mongo/s/grid.cpp | 1 - src/mongo/s/query/async_results_merger.cpp | 1 - src/mongo/s/query/cluster_aggregate.cpp | 1 - src/mongo/s/query/cluster_aggregate_test.cpp | 1 - src/mongo/s/query/cluster_aggregation_planner.cpp | 1 - src/mongo/s/query/cluster_cursor_manager.cpp | 1 - src/mongo/s/query/cluster_find.cpp | 1 - src/mongo/s/query/establish_cursors.cpp | 1 - src/mongo/s/server.cpp | 1 - src/mongo/s/service_entry_point_mongos.cpp | 1 - src/mongo/s/shard_util.cpp | 1 - .../s/sharding_egress_metadata_hook_for_mongos.cpp | 1 - src/mongo/s/sharding_initialization.cpp | 1 - src/mongo/s/sharding_task_executor.cpp | 1 - .../s/sharding_task_executor_pool_controller.cpp | 1 - src/mongo/s/sharding_uptime_reporter.cpp | 1 - src/mongo/s/write_ops/batch_write_exec.cpp | 1 - src/mongo/s/write_ops/chunk_manager_targeter.cpp | 1 - src/mongo/s/write_ops/cluster_write.cpp | 1 - src/mongo/scripting/engine.cpp | 1 - src/mongo/scripting/mozjs/cursor_handle.cpp | 1 - src/mongo/scripting/mozjs/jsthread.cpp | 1 - src/mongo/scripting/mozjs/session.cpp | 1 - src/mongo/scripting/mozjs/valuereader.cpp | 1 - src/mongo/shell/bench.cpp | 1 - src/mongo/shell/kms_aws.cpp | 1 - src/mongo/shell/shell_utils.cpp | 22 +++-- src/mongo/shell/shell_utils_extended.cpp | 2 +- src/mongo/shell/shell_utils_launcher.cpp | 1 - src/mongo/tools/bridge.cpp | 1 - src/mongo/transport/baton_asio_linux.h | 4 +- src/mongo/transport/ismaster_metrics.cpp | 97 ++++++++++++++++++++++ src/mongo/transport/message_compressor_manager.cpp | 1 - .../transport/message_compressor_manager_test.cpp | 1 - src/mongo/transport/service_entry_point_impl.cpp | 1 - src/mongo/transport/service_entry_point_utils.cpp | 1 - src/mongo/transport/service_executor_adaptive.cpp | 1 - .../transport/service_executor_adaptive_test.cpp | 1 - src/mongo/transport/service_executor_reserved.cpp | 1 - .../transport/service_executor_synchronous.cpp | 1 - src/mongo/transport/service_executor_test.cpp | 1 - src/mongo/transport/service_state_machine.cpp | 1 - src/mongo/transport/service_state_machine_test.cpp | 1 - src/mongo/transport/session_asio.h | 13 ++- src/mongo/transport/transport_layer_asio.cpp | 1 - .../transport_layer_asio_integration_test.cpp | 1 - src/mongo/transport/transport_layer_asio_test.cpp | 1 - src/mongo/unittest/benchmark_main.cpp | 1 - src/mongo/unittest/integration_test_main.cpp | 1 - src/mongo/unittest/temp_dir.cpp | 1 - src/mongo/util/alarm_test.cpp | 1 - src/mongo/util/background.cpp | 1 - src/mongo/util/background_thread_clock_source.cpp | 1 - src/mongo/util/concurrency/thread_name.cpp | 1 - src/mongo/util/concurrency/thread_pool_test.cpp | 1 - .../util/concurrency/thread_pool_test_common.cpp | 10 ++- src/mongo/util/concurrency/ticketholder.cpp | 1 - src/mongo/util/concurrency/with_lock_test.cpp | 1 - src/mongo/util/decorable_test.cpp | 1 - src/mongo/util/diagnostic_info.cpp | 1 - src/mongo/util/diagnostic_info_test.cpp | 1 - src/mongo/util/exception_filter_win32.cpp | 1 - src/mongo/util/exit.cpp | 1 - src/mongo/util/fail_point.cpp | 1 - src/mongo/util/file.cpp | 1 - src/mongo/util/heap_profiler.cpp | 1 - src/mongo/util/net/hostname_canonicalization.cpp | 1 - src/mongo/util/net/http_client_curl.cpp | 1 - src/mongo/util/net/http_client_winhttp.cpp | 1 - src/mongo/util/net/openssl_init.cpp | 1 - src/mongo/util/net/private/ssl_expiration.cpp | 1 - src/mongo/util/net/socket_utils.cpp | 2 +- src/mongo/util/net/ssl_manager.cpp | 1 - src/mongo/util/net/ssl_manager_apple.cpp | 1 - src/mongo/util/net/ssl_manager_openssl.cpp | 7 +- src/mongo/util/net/ssl_manager_test.cpp | 1 - src/mongo/util/net/ssl_manager_windows.cpp | 1 - src/mongo/util/net/ssl_options.cpp | 1 - src/mongo/util/net/ssl_options_server.cpp | 1 - src/mongo/util/net/ssl_parameters.cpp | 1 - src/mongo/util/ntservice.cpp | 1 - src/mongo/util/options_parser/options_parser.cpp | 1 - src/mongo/util/password.cpp | 2 +- src/mongo/util/perfctr_collect.cpp | 2 +- src/mongo/util/perfctr_collect_test.cpp | 1 - src/mongo/util/periodic_runner_impl.cpp | 1 - src/mongo/util/platform_init.cpp | 1 - src/mongo/util/processinfo.cpp | 1 - src/mongo/util/processinfo_freebsd.cpp | 1 - src/mongo/util/processinfo_linux.cpp | 1 - src/mongo/util/processinfo_openbsd.cpp | 1 - src/mongo/util/processinfo_osx.cpp | 1 - src/mongo/util/processinfo_solaris.cpp | 1 - src/mongo/util/processinfo_windows.cpp | 1 - src/mongo/util/procparser.cpp | 24 ++++-- src/mongo/util/procparser_test.cpp | 1 - src/mongo/util/signal_handlers_synchronous.cpp | 1 - src/mongo/util/stacktrace_somap.cpp | 29 +++++-- src/mongo/util/stacktrace_test.cpp | 1 - src/mongo/util/stacktrace_threads.cpp | 1 - src/mongo/util/stacktrace_windows.cpp | 1 + src/mongo/util/string_map_test.cpp | 1 - src/mongo/util/tcmalloc_server_status_section.cpp | 1 - src/mongo/util/time_support_test.cpp | 2 +- src/mongo/util/version.cpp | 1 - src/mongo/util/version_impl.cpp | 4 +- src/mongo/watchdog/watchdog.cpp | 1 - src/mongo/watchdog/watchdog_mongod.cpp | 1 - src/mongo/watchdog/watchdog_test.cpp | 1 - 668 files changed, 428 insertions(+), 793 deletions(-) create mode 100644 src/mongo/transport/ismaster_metrics.cpp (limited to 'src') diff --git a/src/mongo/base/secure_allocator.cpp b/src/mongo/base/secure_allocator.cpp index 62dbe147e00..75e673db02d 100644 --- a/src/mongo/base/secure_allocator.cpp +++ b/src/mongo/base/secure_allocator.cpp @@ -48,7 +48,6 @@ #include "mongo/platform/mutex.h" #include "mongo/stdx/unordered_map.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/processinfo.h" #include "mongo/util/scopeguard.h" #include "mongo/util/secure_zero_memory.h" diff --git a/src/mongo/base/status.cpp b/src/mongo/base/status.cpp index 589574efc69..80176c2ba57 100644 --- a/src/mongo/base/status.cpp +++ b/src/mongo/base/status.cpp @@ -32,7 +32,6 @@ #include "mongo/base/status.h" #include "mongo/db/jsobj.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include diff --git a/src/mongo/bson/bson_validate_test.cpp b/src/mongo/bson/bson_validate_test.cpp index 547ff21572e..a31254843f5 100644 --- a/src/mongo/bson/bson_validate_test.cpp +++ b/src/mongo/bson/bson_validate_test.cpp @@ -37,7 +37,6 @@ #include "mongo/logv2/log.h" #include "mongo/platform/random.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace { diff --git a/src/mongo/bson/bsonelement.cpp b/src/mongo/bson/bsonelement.cpp index 2c33e55d8b7..0574c3f8574 100644 --- a/src/mongo/bson/bsonelement.cpp +++ b/src/mongo/bson/bsonelement.cpp @@ -48,7 +48,6 @@ #include "mongo/util/base64.h" #include "mongo/util/duration.h" #include "mongo/util/hex.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" #include "mongo/util/string_map.h" diff --git a/src/mongo/bson/bsonobj.cpp b/src/mongo/bson/bsonobj.cpp index 2144f801ee4..74d3edf1588 100644 --- a/src/mongo/bson/bsonobj.cpp +++ b/src/mongo/bson/bsonobj.cpp @@ -42,7 +42,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/allocator.h" #include "mongo/util/hex.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/bson/bsonobjbuilder.cpp b/src/mongo/bson/bsonobjbuilder.cpp index 6487c93f932..1eab3f0b93c 100644 --- a/src/mongo/bson/bsonobjbuilder.cpp +++ b/src/mongo/bson/bsonobjbuilder.cpp @@ -35,7 +35,6 @@ #include "mongo/bson/timestamp.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/bson/json.cpp b/src/mongo/bson/json.cpp index 7bdafb4f17a..78b71343c0e 100644 --- a/src/mongo/bson/json.cpp +++ b/src/mongo/bson/json.cpp @@ -42,7 +42,6 @@ #include "mongo/util/base64.h" #include "mongo/util/decimal_counter.h" #include "mongo/util/hex.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/time_support.h" diff --git a/src/mongo/client/async_client.cpp b/src/mongo/client/async_client.cpp index 82a0eeff20c..829d557e44e 100644 --- a/src/mongo/client/async_client.cpp +++ b/src/mongo/client/async_client.cpp @@ -50,7 +50,6 @@ #include "mongo/rpc/legacy_request_builder.h" #include "mongo/rpc/metadata/client_metadata.h" #include "mongo/rpc/reply_interface.h" -#include "mongo/util/log.h" #include "mongo/util/net/socket_utils.h" #include "mongo/util/net/ssl_manager.h" #include "mongo/util/version.h" diff --git a/src/mongo/client/authenticate.cpp b/src/mongo/client/authenticate.cpp index 9136aa19ac7..8d4a2dc05ab 100644 --- a/src/mongo/client/authenticate.cpp +++ b/src/mongo/client/authenticate.cpp @@ -46,7 +46,6 @@ #include "mongo/platform/mutex.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/rpc/op_msg_rpc_impls.h" -#include "mongo/util/log.h" #include "mongo/util/net/ssl_manager.h" #include "mongo/util/net/ssl_options.h" #include "mongo/util/password_digest.h" diff --git a/src/mongo/client/connection_string_connect.cpp b/src/mongo/client/connection_string_connect.cpp index 229495c3a0e..935888d3e4a 100644 --- a/src/mongo/client/connection_string_connect.cpp +++ b/src/mongo/client/connection_string_connect.cpp @@ -40,7 +40,6 @@ #include "mongo/client/mongo_uri.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/client/dbclient_base.cpp b/src/mongo/client/dbclient_base.cpp index 7d91816a066..caad3d6cc98 100644 --- a/src/mongo/client/dbclient_base.cpp +++ b/src/mongo/client/dbclient_base.cpp @@ -67,7 +67,6 @@ #include "mongo/util/assert_util.h" #include "mongo/util/concurrency/mutex.h" #include "mongo/util/debug_util.h" -#include "mongo/util/log.h" #include "mongo/util/net/ssl_manager.h" #include "mongo/util/net/ssl_options.h" #include "mongo/util/password_digest.h" diff --git a/src/mongo/client/dbclient_connection.cpp b/src/mongo/client/dbclient_connection.cpp index c7e2a18021c..e39fcec61c7 100644 --- a/src/mongo/client/dbclient_connection.cpp +++ b/src/mongo/client/dbclient_connection.cpp @@ -73,7 +73,6 @@ #include "mongo/util/assert_util.h" #include "mongo/util/concurrency/mutex.h" #include "mongo/util/debug_util.h" -#include "mongo/util/log.h" #include "mongo/util/net/socket_exception.h" #include "mongo/util/net/socket_utils.h" #include "mongo/util/net/ssl_manager.h" diff --git a/src/mongo/client/dbclient_cursor.cpp b/src/mongo/client/dbclient_cursor.cpp index 4fa665c5e14..7af7d314769 100644 --- a/src/mongo/client/dbclient_cursor.cpp +++ b/src/mongo/client/dbclient_cursor.cpp @@ -56,7 +56,6 @@ #include "mongo/util/debug_util.h" #include "mongo/util/destructor_guard.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/client/dbclient_cursor_test.cpp b/src/mongo/client/dbclient_cursor_test.cpp index 41641170333..ae4970f7895 100644 --- a/src/mongo/client/dbclient_cursor_test.cpp +++ b/src/mongo/client/dbclient_cursor_test.cpp @@ -35,7 +35,6 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/client/dbclient_rs.cpp b/src/mongo/client/dbclient_rs.cpp index b71f63fa2ec..126b7d5f03b 100644 --- a/src/mongo/client/dbclient_rs.cpp +++ b/src/mongo/client/dbclient_rs.cpp @@ -46,7 +46,6 @@ #include "mongo/db/dbmessage.h" #include "mongo/db/jsobj.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/client/fetcher.cpp b/src/mongo/client/fetcher.cpp index df0bfb41077..4fe470bf4f4 100644 --- a/src/mongo/client/fetcher.cpp +++ b/src/mongo/client/fetcher.cpp @@ -37,10 +37,11 @@ #include "mongo/db/jsobj.h" #include "mongo/db/namespace_string.h" +#include "mongo/logger/redaction.h" +#include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/util/assert_util.h" #include "mongo/util/destructor_guard.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" @@ -391,20 +392,24 @@ void Fetcher::_sendKillCursors(const CursorId id, const NamespaceString& nss) { if (id) { auto logKillCursorsResult = [](const RemoteCommandCallbackArgs& args) { if (!args.response.isOK()) { - warning() << "killCursors command task failed: " << redact(args.response.status); + LOGV2_WARNING(23918, + "killCursors command task failed: {args_response_status}", + "args_response_status"_attr = redact(args.response.status)); return; } auto status = getStatusFromCommandResult(args.response.data); if (!status.isOK()) { - warning() << "killCursors command failed: " << redact(status); + LOGV2_WARNING( + 23919, "killCursors command failed: {status}", "status"_attr = redact(status)); } }; auto cmdObj = BSON("killCursors" << nss.coll() << "cursors" << BSON_ARRAY(id)); auto scheduleResult = _executor->scheduleRemoteCommand( RemoteCommandRequest(_source, _dbname, cmdObj, nullptr), logKillCursorsResult); if (!scheduleResult.isOK()) { - warning() << "failed to schedule killCursors command: " - << redact(scheduleResult.getStatus()); + LOGV2_WARNING(23920, + "failed to schedule killCursors command: {scheduleResult_getStatus}", + "scheduleResult_getStatus"_attr = redact(scheduleResult.getStatus())); } } } diff --git a/src/mongo/client/mongo_uri_test.cpp b/src/mongo/client/mongo_uri_test.cpp index badc6cf3a96..aadd46b3a6a 100644 --- a/src/mongo/client/mongo_uri_test.cpp +++ b/src/mongo/client/mongo_uri_test.cpp @@ -42,7 +42,6 @@ #include "mongo/unittest/unittest.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include #include #include diff --git a/src/mongo/client/remote_command_retry_scheduler.cpp b/src/mongo/client/remote_command_retry_scheduler.cpp index d6f50082078..a170d68dd28 100644 --- a/src/mongo/client/remote_command_retry_scheduler.cpp +++ b/src/mongo/client/remote_command_retry_scheduler.cpp @@ -38,7 +38,6 @@ #include "mongo/client/remote_command_retry_scheduler.h" #include "mongo/util/assert_util.h" #include "mongo/util/destructor_guard.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/client/remote_command_retry_scheduler_test.cpp b/src/mongo/client/remote_command_retry_scheduler_test.cpp index 03bcbd44fe8..b631e542f79 100644 --- a/src/mongo/client/remote_command_retry_scheduler_test.cpp +++ b/src/mongo/client/remote_command_retry_scheduler_test.cpp @@ -45,7 +45,6 @@ #include "mongo/unittest/task_executor_proxy.h" #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" namespace { diff --git a/src/mongo/client/remote_command_targeter_rs.cpp b/src/mongo/client/remote_command_targeter_rs.cpp index d5640d3a4ae..102d059ae70 100644 --- a/src/mongo/client/remote_command_targeter_rs.cpp +++ b/src/mongo/client/remote_command_targeter_rs.cpp @@ -40,7 +40,6 @@ #include "mongo/db/operation_context.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/str.h" diff --git a/src/mongo/client/replica_set_change_notifier.cpp b/src/mongo/client/replica_set_change_notifier.cpp index b0a35057dd9..00523770718 100644 --- a/src/mongo/client/replica_set_change_notifier.cpp +++ b/src/mongo/client/replica_set_change_notifier.cpp @@ -35,7 +35,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/stacktrace.h" namespace mongo { diff --git a/src/mongo/client/replica_set_monitor.cpp b/src/mongo/client/replica_set_monitor.cpp index e5604439330..807f0bc9f46 100644 --- a/src/mongo/client/replica_set_monitor.cpp +++ b/src/mongo/client/replica_set_monitor.cpp @@ -53,7 +53,6 @@ #include "mongo/util/debug_util.h" #include "mongo/util/exit.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/string_map.h" #include "mongo/util/timer.h" diff --git a/src/mongo/client/replica_set_monitor_manager.cpp b/src/mongo/client/replica_set_monitor_manager.cpp index 8e27ca8e284..13efd98a3a9 100644 --- a/src/mongo/client/replica_set_monitor_manager.cpp +++ b/src/mongo/client/replica_set_monitor_manager.cpp @@ -48,7 +48,6 @@ #include "mongo/logv2/log.h" #include "mongo/platform/mutex.h" #include "mongo/rpc/metadata/egress_metadata_hook_list.h" -#include "mongo/util/log.h" #include "mongo/util/map_util.h" namespace mongo { diff --git a/src/mongo/client/replica_set_monitor_scan_test.cpp b/src/mongo/client/replica_set_monitor_scan_test.cpp index dfac48e56f8..2bc894f27ba 100644 --- a/src/mongo/client/replica_set_monitor_scan_test.cpp +++ b/src/mongo/client/replica_set_monitor_scan_test.cpp @@ -35,7 +35,6 @@ #include "mongo/client/mongo_uri.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/client/sasl_client_authenticate_impl.cpp b/src/mongo/client/sasl_client_authenticate_impl.cpp index f95ed39811d..0a3fdac3f12 100644 --- a/src/mongo/client/sasl_client_authenticate_impl.cpp +++ b/src/mongo/client/sasl_client_authenticate_impl.cpp @@ -51,7 +51,6 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/util/base64.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/password_digest.h" diff --git a/src/mongo/client/sasl_sspi.cpp b/src/mongo/client/sasl_sspi.cpp index 3426ff3943c..86461bd6472 100644 --- a/src/mongo/client/sasl_sspi.cpp +++ b/src/mongo/client/sasl_sspi.cpp @@ -39,7 +39,7 @@ #include "mongo/base/init.h" #include "mongo/base/status.h" #include "mongo/client/sasl_sspi_options.h" -#include "mongo/util/log.h" +#include "mongo/logv2/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" #include "mongo/util/text.h" @@ -210,12 +210,12 @@ int sspiClientMechNew(void* glob_context, ss << fqdn << " "; } ss << "]"; - warning() << ss.str(); + LOGV2_WARNING(23933, "{ss_str}", "ss_str"_attr = ss.str()); } canonName = std::move(fqdns.back()); fqdns.pop_back(); } else if (saslSSPIGlobalParams.canonicalization != HostnameCanonicalizationMode::kNone) { - warning() << "Was unable to acquire an FQDN"; + LOGV2_WARNING(23934, "Was unable to acquire an FQDN"); } pcctx->nameToken = toWideString(cparams->service) + L'/' + toWideString(canonName.c_str()); diff --git a/src/mongo/client/sdam/sdam_json_test_runner.cpp b/src/mongo/client/sdam/sdam_json_test_runner.cpp index ec4b8e453d2..9c750ad977b 100644 --- a/src/mongo/client/sdam/sdam_json_test_runner.cpp +++ b/src/mongo/client/sdam/sdam_json_test_runner.cpp @@ -46,7 +46,6 @@ #include "mongo/logv2/log.h" #include "mongo/stdx/unordered_set.h" #include "mongo/util/clock_source_mock.h" -#include "mongo/util/log.h" #include "mongo/util/options_parser/environment.h" #include "mongo/util/options_parser/option_section.h" #include "mongo/util/options_parser/options_parser.h" diff --git a/src/mongo/client/sdam/server_description.cpp b/src/mongo/client/sdam/server_description.cpp index 8d919251054..1674840a5a6 100644 --- a/src/mongo/client/sdam/server_description.cpp +++ b/src/mongo/client/sdam/server_description.cpp @@ -38,8 +38,8 @@ #include "mongo/bson/bsonobjbuilder.h" #include "mongo/bson/oid.h" #include "mongo/client/sdam/sdam_datatypes.h" +#include "mongo/logv2/log.h" #include "mongo/util/duration.h" -#include "mongo/util/log.h" namespace mongo::sdam { @@ -206,7 +206,9 @@ void ServerDescription::parseTypeFromIsMaster(const BSONObj isMaster) { } else if (isMaster.getBoolField("isreplicaset")) { t = ServerType::kRSGhost; } else { - error() << "unknown server type from successful ismaster reply: " << isMaster.toString(); + LOGV2_ERROR(23931, + "unknown server type from successful ismaster reply: {isMaster}", + "isMaster"_attr = isMaster.toString()); t = ServerType::kUnknown; } _type = t; diff --git a/src/mongo/client/sdam/topology_description.cpp b/src/mongo/client/sdam/topology_description.cpp index 960c0b21057..d3783719864 100644 --- a/src/mongo/client/sdam/topology_description.cpp +++ b/src/mongo/client/sdam/topology_description.cpp @@ -31,7 +31,6 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kNetwork #include "mongo/client/sdam/server_description.h" #include "mongo/db/wire_version.h" -#include "mongo/util/log.h" namespace mongo::sdam { //////////////////////// diff --git a/src/mongo/client/sdam/topology_description_test.cpp b/src/mongo/client/sdam/topology_description_test.cpp index b5aca529bfd..9f7a6a2dbee 100644 --- a/src/mongo/client/sdam/topology_description_test.cpp +++ b/src/mongo/client/sdam/topology_description_test.cpp @@ -38,7 +38,6 @@ #include "mongo/db/wire_version.h" #include "mongo/logv2/log.h" #include "mongo/unittest/death_test.h" -#include "mongo/util/log.h" namespace mongo { template std::ostream& operator<<(std::ostream& os, diff --git a/src/mongo/client/sdam/topology_listener_mock.cpp b/src/mongo/client/sdam/topology_listener_mock.cpp index 5d5fe1db2ff..5b8bcd4a6b0 100644 --- a/src/mongo/client/sdam/topology_listener_mock.cpp +++ b/src/mongo/client/sdam/topology_listener_mock.cpp @@ -31,7 +31,6 @@ #include "mongo/platform/basic.h" #include "mongo/client/sdam/topology_listener_mock.h" -#include "mongo/util/log.h" namespace mongo::sdam { diff --git a/src/mongo/client/sdam/topology_manager.cpp b/src/mongo/client/sdam/topology_manager.cpp index 656ec9bde4d..7897e6948f7 100644 --- a/src/mongo/client/sdam/topology_manager.cpp +++ b/src/mongo/client/sdam/topology_manager.cpp @@ -32,7 +32,6 @@ #include "mongo/client/sdam/topology_state_machine.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo::sdam { @@ -84,9 +83,12 @@ void TopologyManager::onServerDescription(const IsMasterOutcome& isMasterOutcome boost::optional newTopologyVersion = isMasterOutcome.getTopologyVersion(); if (isStaleTopologyVersion(lastTopologyVersion, newTopologyVersion)) { - log() << "Ignoring this isMaster response because our topologyVersion: " - << lastTopologyVersion->toBSON() - << "is fresher than the provided topologyVersion: " << newTopologyVersion->toBSON(); + LOGV2( + 23930, + "Ignoring this isMaster response because our topologyVersion: {lastTopologyVersion}is " + "fresher than the provided topologyVersion: {newTopologyVersion}", + "lastTopologyVersion"_attr = lastTopologyVersion->toBSON(), + "newTopologyVersion"_attr = newTopologyVersion->toBSON()); return; } diff --git a/src/mongo/client/sdam/topology_manager_test.cpp b/src/mongo/client/sdam/topology_manager_test.cpp index fb0fb6a37e5..bc9e9256f1a 100644 --- a/src/mongo/client/sdam/topology_manager_test.cpp +++ b/src/mongo/client/sdam/topology_manager_test.cpp @@ -34,7 +34,6 @@ #include "mongo/client/sdam/sdam_test_base.h" #include "mongo/unittest/death_test.h" -#include "mongo/util/log.h" #include "mongo/util/system_clock_source.h" namespace mongo { diff --git a/src/mongo/client/sdam/topology_state_machine.cpp b/src/mongo/client/sdam/topology_state_machine.cpp index c54053b2260..f15e7a555d5 100644 --- a/src/mongo/client/sdam/topology_state_machine.cpp +++ b/src/mongo/client/sdam/topology_state_machine.cpp @@ -34,7 +34,6 @@ #include "mongo/client/sdam/sdam_test_base.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo::sdam { TopologyStateMachine::TopologyStateMachine(const SdamConfiguration& config) : _config(config) { diff --git a/src/mongo/client/server_ping_monitor.cpp b/src/mongo/client/server_ping_monitor.cpp index 6896a7a2aab..7359b07e503 100644 --- a/src/mongo/client/server_ping_monitor.cpp +++ b/src/mongo/client/server_ping_monitor.cpp @@ -38,7 +38,6 @@ #include "mongo/executor/thread_pool_task_executor.h" #include "mongo/logv2/log.h" #include "mongo/rpc/metadata/egress_metadata_hook_list.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/client/server_ping_monitor_test.cpp b/src/mongo/client/server_ping_monitor_test.cpp index 7025ac70894..b4a3074ce0b 100644 --- a/src/mongo/client/server_ping_monitor_test.cpp +++ b/src/mongo/client/server_ping_monitor_test.cpp @@ -41,9 +41,9 @@ #include "mongo/executor/thread_pool_mock.h" #include "mongo/executor/thread_pool_task_executor.h" #include "mongo/executor/thread_pool_task_executor_test_fixture.h" +#include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" #include "mongo/util/duration.h" -#include "mongo/util/log.h" namespace mongo { namespace { @@ -113,7 +113,10 @@ protected: // Check that it is a ping request from the expected hostAndPort. executor::TaskExecutorTest::assertRemoteCommandNameEquals("ping", request); ASSERT_EQ(request.target.toString(), hostAndPort); - LOG(0) << "at " << elapsed() << " got mock network operation " << request.toString(); + LOGV2(23925, + "at {elapsed} got mock network operation {request}", + "elapsed"_attr = elapsed(), + "request"_attr = request.toString()); const auto node = replSet->getNode(hostAndPort); node->setCommandReply("ping", BSON("ok" << 1)); @@ -132,9 +135,13 @@ protected: InNetworkGuard guard(_net); // Operations can happen inline with advanceTime(), so log before and after the call. - LOG(1) << "Advancing time from " << elapsed() << " to " << (elapsed() + d); + LOGV2_DEBUG(23926, + 1, + "Advancing time from {elapsed} to {elapsed_d}", + "elapsed"_attr = elapsed(), + "elapsed_d"_attr = (elapsed() + d)); _net->advanceTime(_net->now() + d); - LOG(1) << "Advanced to " << elapsed(); + LOGV2_DEBUG(23927, 1, "Advanced to {elapsed}", "elapsed"_attr = elapsed()); } /** diff --git a/src/mongo/crypto/mechanism_scram_test.cpp b/src/mongo/crypto/mechanism_scram_test.cpp index 8d5ea962429..9c5efba8d54 100644 --- a/src/mongo/crypto/mechanism_scram_test.cpp +++ b/src/mongo/crypto/mechanism_scram_test.cpp @@ -35,7 +35,6 @@ #include "mongo/crypto/sha1_block.h" #include "mongo/crypto/sha256_block.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { namespace scram { diff --git a/src/mongo/crypto/symmetric_crypto.cpp b/src/mongo/crypto/symmetric_crypto.cpp index 0a6bbc2e916..81a7603f3e8 100644 --- a/src/mongo/crypto/symmetric_crypto.cpp +++ b/src/mongo/crypto/symmetric_crypto.cpp @@ -41,7 +41,6 @@ #include "mongo/crypto/symmetric_key.h" #include "mongo/platform/random.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/net/ssl_manager.h" #include "mongo/util/str.h" diff --git a/src/mongo/crypto/symmetric_crypto_openssl.cpp b/src/mongo/crypto/symmetric_crypto_openssl.cpp index 4e661b98bbd..a0c52f9954e 100644 --- a/src/mongo/crypto/symmetric_crypto_openssl.cpp +++ b/src/mongo/crypto/symmetric_crypto_openssl.cpp @@ -42,7 +42,6 @@ #include "mongo/crypto/symmetric_key.h" #include "mongo/platform/random.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/net/ssl_manager.h" #include "mongo/util/str.h" diff --git a/src/mongo/crypto/symmetric_crypto_windows.cpp b/src/mongo/crypto/symmetric_crypto_windows.cpp index 25dd5f304b8..5335e5d8f10 100644 --- a/src/mongo/crypto/symmetric_crypto_windows.cpp +++ b/src/mongo/crypto/symmetric_crypto_windows.cpp @@ -40,7 +40,7 @@ #include "mongo/crypto/symmetric_key.h" #include "mongo/platform/shared_library.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" +#include "mongo/util/errno_util.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/crypto/symmetric_key.cpp b/src/mongo/crypto/symmetric_key.cpp index a2bf2526bea..7626d83e8b1 100644 --- a/src/mongo/crypto/symmetric_key.cpp +++ b/src/mongo/crypto/symmetric_key.cpp @@ -36,7 +36,7 @@ #include #include "mongo/crypto/symmetric_crypto.h" -#include "mongo/util/log.h" +#include "mongo/logv2/log.h" #include "mongo/util/secure_zero_memory.h" #include "mongo/util/str.h" @@ -66,7 +66,9 @@ SymmetricKey::SymmetricKey(const uint8_t* key, _initializationCount(initializationCount), _invocationCount(0) { if (_keySize < crypto::minKeySize || _keySize > crypto::maxKeySize) { - error() << "Attempt to construct symmetric key of invalid size: " << _keySize; + LOGV2_ERROR(23866, + "Attempt to construct symmetric key of invalid size: {keySize}", + "keySize"_attr = _keySize); return; } } diff --git a/src/mongo/db/auth/action_set.cpp b/src/mongo/db/auth/action_set.cpp index 84cefde250b..38cf6747fd2 100644 --- a/src/mongo/db/auth/action_set.cpp +++ b/src/mongo/db/auth/action_set.cpp @@ -38,7 +38,6 @@ #include "mongo/base/status.h" #include "mongo/bson/util/builder.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/auth/authorization_manager_impl.cpp b/src/mongo/db/auth/authorization_manager_impl.cpp index a1314fddee0..ec3c90bcc99 100644 --- a/src/mongo/db/auth/authorization_manager_impl.cpp +++ b/src/mongo/db/auth/authorization_manager_impl.cpp @@ -53,7 +53,6 @@ #include "mongo/db/mongod_options.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/auth/authorization_session.cpp b/src/mongo/db/auth/authorization_session.cpp index 19172661b6a..a6cbaf43eb9 100644 --- a/src/mongo/db/auth/authorization_session.cpp +++ b/src/mongo/db/auth/authorization_session.cpp @@ -53,7 +53,6 @@ #include "mongo/db/pipeline/aggregation_request.h" #include "mongo/db/pipeline/lite_parsed_pipeline.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/auth/authorization_session_impl.cpp b/src/mongo/db/auth/authorization_session_impl.cpp index c0beeb758aa..175278b7d3d 100644 --- a/src/mongo/db/auth/authorization_session_impl.cpp +++ b/src/mongo/db/auth/authorization_session_impl.cpp @@ -55,7 +55,6 @@ #include "mongo/db/pipeline/lite_parsed_pipeline.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/auth/authz_manager_external_state_d.cpp b/src/mongo/db/auth/authz_manager_external_state_d.cpp index 99dab1244ac..7fc70ac1983 100644 --- a/src/mongo/db/auth/authz_manager_external_state_d.cpp +++ b/src/mongo/db/auth/authz_manager_external_state_d.cpp @@ -48,7 +48,6 @@ #include "mongo/db/service_context.h" #include "mongo/db/storage/storage_engine.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { 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 289d2d4dec7..15ec6f917fe 100644 --- a/src/mongo/db/auth/authz_manager_external_state_local.cpp +++ b/src/mongo/db/auth/authz_manager_external_state_local.cpp @@ -44,7 +44,6 @@ #include "mongo/db/operation_context.h" #include "mongo/db/server_options.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/net/ssl_types.h" #include "mongo/util/str.h" 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 9b29806013b..fab72713c40 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 @@ -40,7 +40,6 @@ #include "mongo/db/client.h" #include "mongo/logv2/log.h" #include "mongo/util/debug_util.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/auth/resource_pattern.cpp b/src/mongo/db/auth/resource_pattern.cpp index a1cd92838d9..7e910d8c053 100644 --- a/src/mongo/db/auth/resource_pattern.cpp +++ b/src/mongo/db/auth/resource_pattern.cpp @@ -35,7 +35,6 @@ #include "mongo/db/auth/resource_pattern.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/auth/sasl_authentication_session_test.cpp b/src/mongo/db/auth/sasl_authentication_session_test.cpp index d83f8455a23..cb31584a996 100644 --- a/src/mongo/db/auth/sasl_authentication_session_test.cpp +++ b/src/mongo/db/auth/sasl_authentication_session_test.cpp @@ -51,7 +51,6 @@ #include "mongo/db/operation_context.h" #include "mongo/db/service_context_test_fixture.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" #include "mongo/util/password_digest.h" namespace mongo { diff --git a/src/mongo/db/auth/sasl_commands.cpp b/src/mongo/db/auth/sasl_commands.cpp index b91fa86b9a2..63c0f6fbb78 100644 --- a/src/mongo/db/auth/sasl_commands.cpp +++ b/src/mongo/db/auth/sasl_commands.cpp @@ -55,7 +55,6 @@ #include "mongo/db/stats/counters.h" #include "mongo/logv2/log.h" #include "mongo/util/base64.h" -#include "mongo/util/log.h" #include "mongo/util/sequence_util.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/auth/sasl_mechanism_registry.cpp b/src/mongo/db/auth/sasl_mechanism_registry.cpp index 5c07d4e2eac..207dc844174 100644 --- a/src/mongo/db/auth/sasl_mechanism_registry.cpp +++ b/src/mongo/db/auth/sasl_mechanism_registry.cpp @@ -37,7 +37,6 @@ #include "mongo/db/auth/user.h" #include "mongo/logv2/log.h" #include "mongo/util/icu.h" -#include "mongo/util/log.h" #include "mongo/util/net/socket_utils.h" #include "mongo/util/scopeguard.h" #include "mongo/util/sequence_util.h" diff --git a/src/mongo/db/auth/sasl_options_init.cpp b/src/mongo/db/auth/sasl_options_init.cpp index 51ba683342b..18c7f55f427 100644 --- a/src/mongo/db/auth/sasl_options_init.cpp +++ b/src/mongo/db/auth/sasl_options_init.cpp @@ -35,7 +35,6 @@ #include #include "mongo/base/status.h" -#include "mongo/util/log.h" #include "mongo/util/net/socket_utils.h" #include "mongo/util/options_parser/startup_option_init.h" #include "mongo/util/options_parser/startup_options.h" diff --git a/src/mongo/db/auth/sasl_scram_server_conversation.cpp b/src/mongo/db/auth/sasl_scram_server_conversation.cpp index cb401e0b45d..647960f3fcf 100644 --- a/src/mongo/db/auth/sasl_scram_server_conversation.cpp +++ b/src/mongo/db/auth/sasl_scram_server_conversation.cpp @@ -47,7 +47,6 @@ #include "mongo/db/auth/sasl_options.h" #include "mongo/platform/random.h" #include "mongo/util/base64.h" -#include "mongo/util/log.h" #include "mongo/util/sequence_util.h" #include "mongo/util/str.h" #include "mongo/util/text.h" diff --git a/src/mongo/db/auth/sasl_scram_test.cpp b/src/mongo/db/auth/sasl_scram_test.cpp index 81b89590101..254477697d8 100644 --- a/src/mongo/db/auth/sasl_scram_test.cpp +++ b/src/mongo/db/auth/sasl_scram_test.cpp @@ -50,7 +50,6 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" #include "mongo/util/base64.h" -#include "mongo/util/log.h" #include "mongo/util/password_digest.h" namespace mongo { diff --git a/src/mongo/db/auth/security_key.cpp b/src/mongo/db/auth/security_key.cpp index 5fb3d1badd4..770781c4122 100644 --- a/src/mongo/db/auth/security_key.cpp +++ b/src/mongo/db/auth/security_key.cpp @@ -54,7 +54,6 @@ #include "mongo/db/server_options.h" #include "mongo/logv2/log.h" #include "mongo/util/icu.h" -#include "mongo/util/log.h" #include "mongo/util/password_digest.h" namespace mongo { diff --git a/src/mongo/db/auth/user_cache_invalidator_job.cpp b/src/mongo/db/auth/user_cache_invalidator_job.cpp index d301173441e..bb5c99b1518 100644 --- a/src/mongo/db/auth/user_cache_invalidator_job.cpp +++ b/src/mongo/db/auth/user_cache_invalidator_job.cpp @@ -50,7 +50,6 @@ #include "mongo/util/background.h" #include "mongo/util/concurrency/idle_thread_block.h" #include "mongo/util/duration.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/db/auth/user_document_parser.cpp b/src/mongo/db/auth/user_document_parser.cpp index 3b9548f93dc..81e3ca6157e 100644 --- a/src/mongo/db/auth/user_document_parser.cpp +++ b/src/mongo/db/auth/user_document_parser.cpp @@ -42,7 +42,6 @@ #include "mongo/db/jsobj.h" #include "mongo/db/namespace_string.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/catalog/coll_mod.cpp b/src/mongo/db/catalog/coll_mod.cpp index f73b63b3da5..e525628b169 100644 --- a/src/mongo/db/catalog/coll_mod.cpp +++ b/src/mongo/db/catalog/coll_mod.cpp @@ -58,7 +58,6 @@ #include "mongo/db/views/view_catalog.h" #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/catalog/collection_catalog.cpp b/src/mongo/db/catalog/collection_catalog.cpp index 47dea8b1ad5..f3d1af33861 100644 --- a/src/mongo/db/catalog/collection_catalog.cpp +++ b/src/mongo/db/catalog/collection_catalog.cpp @@ -39,7 +39,6 @@ #include "mongo/db/storage/recovery_unit.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/uuid.h" namespace mongo { diff --git a/src/mongo/db/catalog/collection_compact.cpp b/src/mongo/db/catalog/collection_compact.cpp index 803c11cdd79..45ab8dba952 100644 --- a/src/mongo/db/catalog/collection_compact.cpp +++ b/src/mongo/db/catalog/collection_compact.cpp @@ -43,7 +43,6 @@ #include "mongo/db/views/view_catalog.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/catalog/collection_impl.cpp b/src/mongo/db/catalog/collection_impl.cpp index cf1864f7f22..960ea4bbb6b 100644 --- a/src/mongo/db/catalog/collection_impl.cpp +++ b/src/mongo/db/catalog/collection_impl.cpp @@ -74,7 +74,6 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/object_check.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/catalog/collection_validation.cpp b/src/mongo/db/catalog/collection_validation.cpp index 8cce0049db4..ffdff6aa52d 100644 --- a/src/mongo/db/catalog/collection_validation.cpp +++ b/src/mongo/db/catalog/collection_validation.cpp @@ -46,7 +46,6 @@ #include "mongo/db/views/view_catalog.h" #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/catalog/create_collection.cpp b/src/mongo/db/catalog/create_collection.cpp index d6c1c767623..68d73151f69 100644 --- a/src/mongo/db/catalog/create_collection.cpp +++ b/src/mongo/db/catalog/create_collection.cpp @@ -49,7 +49,6 @@ #include "mongo/db/views/view_catalog.h" #include "mongo/logger/redaction.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/catalog/database_holder_impl.cpp b/src/mongo/db/catalog/database_holder_impl.cpp index c16c9cf0b0a..c84a0261a4b 100644 --- a/src/mongo/db/catalog/database_holder_impl.cpp +++ b/src/mongo/db/catalog/database_holder_impl.cpp @@ -45,7 +45,6 @@ #include "mongo/db/stats/top.h" #include "mongo/db/storage/storage_engine.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/catalog/database_impl.cpp b/src/mongo/db/catalog/database_impl.cpp index f9872364a89..cd3acddc725 100644 --- a/src/mongo/db/catalog/database_impl.cpp +++ b/src/mongo/db/catalog/database_impl.cpp @@ -78,7 +78,6 @@ #include "mongo/s/cannot_implicitly_create_collection_info.h" #include "mongo/util/assert_util.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/catalog/drop_collection.cpp b/src/mongo/db/catalog/drop_collection.cpp index ca7a93a945b..4c43cfff485 100644 --- a/src/mongo/db/catalog/drop_collection.cpp +++ b/src/mongo/db/catalog/drop_collection.cpp @@ -47,7 +47,6 @@ #include "mongo/db/views/view_catalog.h" #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/catalog/drop_database.cpp b/src/mongo/db/catalog/drop_database.cpp index 7276059b343..f106829cef0 100644 --- a/src/mongo/db/catalog/drop_database.cpp +++ b/src/mongo/db/catalog/drop_database.cpp @@ -50,7 +50,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/duration.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/catalog/drop_indexes.cpp b/src/mongo/db/catalog/drop_indexes.cpp index f5c09eec982..dc568301a88 100644 --- a/src/mongo/db/catalog/drop_indexes.cpp +++ b/src/mongo/db/catalog/drop_indexes.cpp @@ -47,7 +47,6 @@ #include "mongo/db/service_context.h" #include "mongo/db/views/view_catalog.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/catalog/index_build_block.cpp b/src/mongo/db/catalog/index_build_block.cpp index 3cc6bd8f893..ec9bd924517 100644 --- a/src/mongo/db/catalog/index_build_block.cpp +++ b/src/mongo/db/catalog/index_build_block.cpp @@ -47,7 +47,6 @@ #include "mongo/db/ttl_collection_cache.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/catalog/index_builds_manager.cpp b/src/mongo/db/catalog/index_builds_manager.cpp index 62d1e2c8678..fa15f48873a 100644 --- a/src/mongo/db/catalog/index_builds_manager.cpp +++ b/src/mongo/db/catalog/index_builds_manager.cpp @@ -42,7 +42,6 @@ #include "mongo/db/storage/write_unit_of_work.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/catalog/index_catalog_entry_impl.cpp b/src/mongo/db/catalog/index_catalog_entry_impl.cpp index cd2a5f18b32..2a9593d7ca8 100644 --- a/src/mongo/db/catalog/index_catalog_entry_impl.cpp +++ b/src/mongo/db/catalog/index_catalog_entry_impl.cpp @@ -53,7 +53,6 @@ #include "mongo/db/storage/durable_catalog.h" #include "mongo/db/transaction_participant.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/catalog/index_catalog_impl.cpp b/src/mongo/db/catalog/index_catalog_impl.cpp index 27f873b532f..0c637730bf6 100644 --- a/src/mongo/db/catalog/index_catalog_impl.cpp +++ b/src/mongo/db/catalog/index_catalog_impl.cpp @@ -76,7 +76,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/represent_as.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/catalog/index_consistency.cpp b/src/mongo/db/catalog/index_consistency.cpp index 83d9d45f19b..966b0ada728 100644 --- a/src/mongo/db/catalog/index_consistency.cpp +++ b/src/mongo/db/catalog/index_consistency.cpp @@ -38,7 +38,6 @@ #include "mongo/db/catalog/index_catalog.h" #include "mongo/db/db_raii.h" #include "mongo/db/index/index_descriptor.h" -#include "mongo/util/log.h" #include "mongo/util/string_map.h" namespace mongo { diff --git a/src/mongo/db/catalog/index_key_validate.cpp b/src/mongo/db/catalog/index_key_validate.cpp index e107e000196..df78566a8ad 100644 --- a/src/mongo/db/catalog/index_key_validate.cpp +++ b/src/mongo/db/catalog/index_key_validate.cpp @@ -50,8 +50,8 @@ #include "mongo/db/query/collation/collator_factory_interface.h" #include "mongo/db/query/query_knobs_gen.h" #include "mongo/db/service_context.h" +#include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/represent_as.h" #include "mongo/util/str.h" @@ -243,8 +243,10 @@ BSONObj removeUnknownFields(const BSONObj& indexSpec) { if (allowedFieldNames.count(fieldName)) { builder.append(indexSpecElem); } else { - warning() << "Removing field '" << redact(fieldName) - << "' from index spec: " << redact(indexSpec); + LOGV2_WARNING(23878, + "Removing field '{fieldName}' from index spec: {indexSpec}", + "fieldName"_attr = redact(fieldName), + "indexSpec"_attr = redact(indexSpec)); } } return builder.obj(); diff --git a/src/mongo/db/catalog/index_timestamp_helper.cpp b/src/mongo/db/catalog/index_timestamp_helper.cpp index 55e8dd04d74..bfdc902ba20 100644 --- a/src/mongo/db/catalog/index_timestamp_helper.cpp +++ b/src/mongo/db/catalog/index_timestamp_helper.cpp @@ -36,7 +36,6 @@ #include "mongo/db/repl/member_state.h" #include "mongo/db/repl/replication_coordinator.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/catalog/multi_index_block.cpp b/src/mongo/db/catalog/multi_index_block.cpp index b3a7aaf8209..0caa2d31609 100644 --- a/src/mongo/db/catalog/multi_index_block.cpp +++ b/src/mongo/db/catalog/multi_index_block.cpp @@ -57,7 +57,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/progress_meter.h" #include "mongo/util/quick_exit.h" #include "mongo/util/scopeguard.h" diff --git a/src/mongo/db/catalog/rename_collection.cpp b/src/mongo/db/catalog/rename_collection.cpp index 16af3071493..a38eb0ae38a 100644 --- a/src/mongo/db/catalog/rename_collection.cpp +++ b/src/mongo/db/catalog/rename_collection.cpp @@ -60,7 +60,6 @@ #include "mongo/db/views/view_catalog.h" #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/catalog/uncommitted_collections.cpp b/src/mongo/db/catalog/uncommitted_collections.cpp index c392c604164..853a5afecac 100644 --- a/src/mongo/db/catalog/uncommitted_collections.cpp +++ b/src/mongo/db/catalog/uncommitted_collections.cpp @@ -35,7 +35,6 @@ #include "mongo/db/catalog/uncommitted_collections.h" #include "mongo/db/storage/durable_catalog.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/catalog/validate_adaptor.cpp b/src/mongo/db/catalog/validate_adaptor.cpp index 18c3157dabd..ec37e24c913 100644 --- a/src/mongo/db/catalog/validate_adaptor.cpp +++ b/src/mongo/db/catalog/validate_adaptor.cpp @@ -48,7 +48,6 @@ #include "mongo/db/storage/record_store.h" #include "mongo/logv2/log.h" #include "mongo/rpc/object_check.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/catalog/validate_state.cpp b/src/mongo/db/catalog/validate_state.cpp index 843d7527c9b..5341d4da9d4 100644 --- a/src/mongo/db/catalog/validate_state.cpp +++ b/src/mongo/db/catalog/validate_state.cpp @@ -44,7 +44,6 @@ #include "mongo/db/views/view_catalog.h" #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/catalog/validate_state_test.cpp b/src/mongo/db/catalog/validate_state_test.cpp index f3eda081bfe..5742e0f782f 100644 --- a/src/mongo/db/catalog/validate_state_test.cpp +++ b/src/mongo/db/catalog/validate_state_test.cpp @@ -39,7 +39,6 @@ #include "mongo/db/storage/durable_catalog.h" #include "mongo/db/storage/wiredtiger/wiredtiger_global_options.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/catalog_raii_test.cpp b/src/mongo/db/catalog_raii_test.cpp index 5165baebc55..fbaecc2ab5b 100644 --- a/src/mongo/db/catalog_raii_test.cpp +++ b/src/mongo/db/catalog_raii_test.cpp @@ -43,7 +43,6 @@ #include "mongo/db/storage/recovery_unit_noop.h" #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/db/cloner.cpp b/src/mongo/db/cloner.cpp index 8dd960c2a2c..cfd795a3b52 100644 --- a/src/mongo/db/cloner.cpp +++ b/src/mongo/db/cloner.cpp @@ -65,7 +65,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/collection_index_builds_tracker.cpp b/src/mongo/db/collection_index_builds_tracker.cpp index 2c81c638d62..439a29b9be1 100644 --- a/src/mongo/db/collection_index_builds_tracker.cpp +++ b/src/mongo/db/collection_index_builds_tracker.cpp @@ -35,7 +35,6 @@ #include "mongo/db/catalog/index_builds_manager.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { @@ -130,7 +129,9 @@ void CollectionIndexBuildsTracker::waitUntilNoIndexBuildsRemain(stdx::unique_loc void CollectionIndexBuildsTracker::waitUntilIndexBuildFinished(stdx::unique_lock& lk, const UUID& buildUUID) { - log() << "Waiting until index build with UUID " << buildUUID << " is finished"; + LOGV2(23867, + "Waiting until index build with UUID {buildUUID} is finished", + "buildUUID"_attr = buildUUID); _indexBuildFinishedCondVar.wait(lk, [&] { if (_buildStateByBuildUUID.find(buildUUID) == _buildStateByBuildUUID.end()) { diff --git a/src/mongo/db/collection_index_usage_tracker.cpp b/src/mongo/db/collection_index_usage_tracker.cpp index 0a694602c89..621f5d2ce73 100644 --- a/src/mongo/db/collection_index_usage_tracker.cpp +++ b/src/mongo/db/collection_index_usage_tracker.cpp @@ -36,7 +36,6 @@ #include "mongo/db/commands/server_status_metric.h" #include "mongo/util/assert_util.h" #include "mongo/util/clock_source.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/commands.cpp b/src/mongo/db/commands.cpp index e556947cbce..433bd033588 100644 --- a/src/mongo/db/commands.cpp +++ b/src/mongo/db/commands.cpp @@ -63,7 +63,6 @@ #include "mongo/s/stale_exception.h" #include "mongo/util/fail_point.h" #include "mongo/util/invariant.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/commands/apply_ops_cmd.cpp b/src/mongo/db/commands/apply_ops_cmd.cpp index c7f216fe160..53bcf4ad86f 100644 --- a/src/mongo/db/commands/apply_ops_cmd.cpp +++ b/src/mongo/db/commands/apply_ops_cmd.cpp @@ -50,7 +50,6 @@ #include "mongo/db/repl/oplog.h" #include "mongo/db/repl/repl_client_info.h" #include "mongo/db/service_context.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/uuid.h" diff --git a/src/mongo/db/commands/authentication_commands.cpp b/src/mongo/db/commands/authentication_commands.cpp index 3891bc6e330..ea960d03cd3 100644 --- a/src/mongo/db/commands/authentication_commands.cpp +++ b/src/mongo/db/commands/authentication_commands.cpp @@ -60,7 +60,6 @@ #include "mongo/rpc/metadata/client_metadata_ismaster.h" #include "mongo/transport/session.h" #include "mongo/util/concurrency/mutex.h" -#include "mongo/util/log.h" #include "mongo/util/net/ssl_manager.h" #include "mongo/util/net/ssl_types.h" #include "mongo/util/text.h" diff --git a/src/mongo/db/commands/compact.cpp b/src/mongo/db/commands/compact.cpp index 85d15fa61a9..3799996ee89 100644 --- a/src/mongo/db/commands/compact.cpp +++ b/src/mongo/db/commands/compact.cpp @@ -45,7 +45,6 @@ #include "mongo/db/jsobj.h" #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/views/view_catalog.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/commands/count_cmd.cpp b/src/mongo/db/commands/count_cmd.cpp index 168f8c12c67..14cdb0c0f98 100644 --- a/src/mongo/db/commands/count_cmd.cpp +++ b/src/mongo/db/commands/count_cmd.cpp @@ -47,7 +47,6 @@ #include "mongo/db/query/view_response_formatter.h" #include "mongo/db/s/collection_sharding_state.h" #include "mongo/db/views/resolved_view.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/commands/create_indexes.cpp b/src/mongo/db/commands/create_indexes.cpp index 3ea9f94aea4..8e18e9265a1 100644 --- a/src/mongo/db/commands/create_indexes.cpp +++ b/src/mongo/db/commands/create_indexes.cpp @@ -64,7 +64,6 @@ #include "mongo/logv2/log.h" #include "mongo/platform/compiler.h" #include "mongo/s/shard_key_pattern.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/uuid.h" diff --git a/src/mongo/db/commands/dbcheck.cpp b/src/mongo/db/commands/dbcheck.cpp index a446095f91b..726942abde0 100644 --- a/src/mongo/db/commands/dbcheck.cpp +++ b/src/mongo/db/commands/dbcheck.cpp @@ -48,7 +48,6 @@ #include "mongo/util/background.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/commands/dbcommands.cpp b/src/mongo/db/commands/dbcommands.cpp index ce4087e9026..fa3b2e6554d 100644 --- a/src/mongo/db/commands/dbcommands.cpp +++ b/src/mongo/db/commands/dbcommands.cpp @@ -90,7 +90,6 @@ #include "mongo/logv2/log.h" #include "mongo/scripting/engine.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/md5.hpp" #include "mongo/util/scopeguard.h" #include "mongo/util/version.h" diff --git a/src/mongo/db/commands/dbcommands_d.cpp b/src/mongo/db/commands/dbcommands_d.cpp index 8044d6abaef..96ca732caa6 100644 --- a/src/mongo/db/commands/dbcommands_d.cpp +++ b/src/mongo/db/commands/dbcommands_d.cpp @@ -90,7 +90,6 @@ #include "mongo/s/stale_exception.h" #include "mongo/scripting/engine.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/md5.hpp" #include "mongo/util/scopeguard.h" diff --git a/src/mongo/db/commands/dbhash.cpp b/src/mongo/db/commands/dbhash.cpp index 7da824f9a10..78213b2a402 100644 --- a/src/mongo/db/commands/dbhash.cpp +++ b/src/mongo/db/commands/dbhash.cpp @@ -52,7 +52,6 @@ #include "mongo/db/transaction_participant.h" #include "mongo/logv2/log.h" #include "mongo/platform/mutex.h" -#include "mongo/util/log.h" #include "mongo/util/md5.hpp" #include "mongo/util/net/socket_utils.h" #include "mongo/util/timer.h" diff --git a/src/mongo/db/commands/distinct.cpp b/src/mongo/db/commands/distinct.cpp index 0c2d046b9cb..f580846dc0b 100644 --- a/src/mongo/db/commands/distinct.cpp +++ b/src/mongo/db/commands/distinct.cpp @@ -58,7 +58,6 @@ #include "mongo/db/s/collection_sharding_state.h" #include "mongo/db/views/resolved_view.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/commands/drop_connections_command.cpp b/src/mongo/db/commands/drop_connections_command.cpp index 29c86e1a8af..7fbd3e12afe 100644 --- a/src/mongo/db/commands/drop_connections_command.cpp +++ b/src/mongo/db/commands/drop_connections_command.cpp @@ -35,7 +35,6 @@ #include "mongo/db/commands.h" #include "mongo/db/commands/drop_connections_gen.h" #include "mongo/executor/egress_tag_closer_manager.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" namespace mongo { diff --git a/src/mongo/db/commands/drop_indexes.cpp b/src/mongo/db/commands/drop_indexes.cpp index 58fee79a890..18990278bd6 100644 --- a/src/mongo/db/commands/drop_indexes.cpp +++ b/src/mongo/db/commands/drop_indexes.cpp @@ -54,7 +54,6 @@ #include "mongo/db/storage/durable_catalog.h" #include "mongo/db/views/view_catalog.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/quick_exit.h" namespace mongo { diff --git a/src/mongo/db/commands/fail_point_cmd.cpp b/src/mongo/db/commands/fail_point_cmd.cpp index f166169a805..6682c788ccf 100644 --- a/src/mongo/db/commands/fail_point_cmd.cpp +++ b/src/mongo/db/commands/fail_point_cmd.cpp @@ -39,7 +39,6 @@ #include "mongo/db/commands/test_commands_enabled.h" #include "mongo/s/request_types/wait_for_fail_point_gen.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/commands/feature_compatibility_version.cpp b/src/mongo/db/commands/feature_compatibility_version.cpp index 0e9509623b6..cffd5882666 100644 --- a/src/mongo/db/commands/feature_compatibility_version.cpp +++ b/src/mongo/db/commands/feature_compatibility_version.cpp @@ -57,7 +57,6 @@ #include "mongo/s/catalog_cache.h" #include "mongo/s/grid.h" #include "mongo/transport/service_entry_point.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/commands/find_and_modify.cpp b/src/mongo/db/commands/find_and_modify.cpp index 80dd15884ea..d9b7d556f40 100644 --- a/src/mongo/db/commands/find_and_modify.cpp +++ b/src/mongo/db/commands/find_and_modify.cpp @@ -71,7 +71,6 @@ #include "mongo/db/transaction_participant.h" #include "mongo/db/write_concern.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/commands/find_cmd.cpp b/src/mongo/db/commands/find_cmd.cpp index eec207cd98f..0bb4abdccaa 100644 --- a/src/mongo/db/commands/find_cmd.cpp +++ b/src/mongo/db/commands/find_cmd.cpp @@ -56,7 +56,6 @@ #include "mongo/db/transaction_participant.h" #include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/commands/fsync.cpp b/src/mongo/db/commands/fsync.cpp index becd1c00ba6..9aad9e15662 100644 --- a/src/mongo/db/commands/fsync.cpp +++ b/src/mongo/db/commands/fsync.cpp @@ -54,7 +54,6 @@ #include "mongo/util/assert_util.h" #include "mongo/util/background.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/commands/generic.cpp b/src/mongo/db/commands/generic.cpp index 5ba09526814..67252ec4c5f 100644 --- a/src/mongo/db/commands/generic.cpp +++ b/src/mongo/db/commands/generic.cpp @@ -36,7 +36,6 @@ #include "mongo/db/commands.h" #include "mongo/db/commands/test_commands_enabled.h" #include "mongo/db/log_process_details.h" -#include "mongo/util/log.h" #include "mongo/util/processinfo.h" #include "mongo/util/ramlog.h" diff --git a/src/mongo/db/commands/get_last_error.cpp b/src/mongo/db/commands/get_last_error.cpp index fc8185e2978..ae71cbaa1ed 100644 --- a/src/mongo/db/commands/get_last_error.cpp +++ b/src/mongo/db/commands/get_last_error.cpp @@ -42,7 +42,6 @@ #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/write_concern.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/commands/getmore_cmd.cpp b/src/mongo/db/commands/getmore_cmd.cpp index 15b84ad2be1..3c35ee3dcda 100644 --- a/src/mongo/db/commands/getmore_cmd.cpp +++ b/src/mongo/db/commands/getmore_cmd.cpp @@ -60,7 +60,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/chunk_version.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/time_support.h" diff --git a/src/mongo/db/commands/http_client.cpp b/src/mongo/db/commands/http_client.cpp index 591dea0e25c..3448c7a3cb7 100644 --- a/src/mongo/db/commands/http_client.cpp +++ b/src/mongo/db/commands/http_client.cpp @@ -38,7 +38,6 @@ #include "mongo/db/commands/http_client_gen.h" #include "mongo/db/commands/test_commands_enabled.h" #include "mongo/db/operation_context.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/net/http_client.h" diff --git a/src/mongo/db/commands/index_filter_commands.cpp b/src/mongo/db/commands/index_filter_commands.cpp index e1348bb8eda..2df7e81f272 100644 --- a/src/mongo/db/commands/index_filter_commands.cpp +++ b/src/mongo/db/commands/index_filter_commands.cpp @@ -52,7 +52,6 @@ #include "mongo/db/query/collection_query_info.h" #include "mongo/logv2/log.h" #include "mongo/stdx/unordered_set.h" -#include "mongo/util/log.h" namespace { diff --git a/src/mongo/db/commands/kill_all_sessions_by_pattern_command.cpp b/src/mongo/db/commands/kill_all_sessions_by_pattern_command.cpp index 7c3a18d550b..73ebc9cc609 100644 --- a/src/mongo/db/commands/kill_all_sessions_by_pattern_command.cpp +++ b/src/mongo/db/commands/kill_all_sessions_by_pattern_command.cpp @@ -48,7 +48,6 @@ #include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" #include "mongo/db/stats/top.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/commands/kill_all_sessions_command.cpp b/src/mongo/db/commands/kill_all_sessions_command.cpp index b11513efd55..158502f0d9a 100644 --- a/src/mongo/db/commands/kill_all_sessions_command.cpp +++ b/src/mongo/db/commands/kill_all_sessions_command.cpp @@ -48,7 +48,6 @@ #include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" #include "mongo/db/stats/top.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/commands/kill_op.cpp b/src/mongo/db/commands/kill_op.cpp index fa088731393..ab9403f7d64 100644 --- a/src/mongo/db/commands/kill_op.cpp +++ b/src/mongo/db/commands/kill_op.cpp @@ -44,7 +44,6 @@ #include "mongo/db/operation_context.h" #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/commands/kill_sessions_command.cpp b/src/mongo/db/commands/kill_sessions_command.cpp index afa5d2357e1..8d4c2293aa9 100644 --- a/src/mongo/db/commands/kill_sessions_command.cpp +++ b/src/mongo/db/commands/kill_sessions_command.cpp @@ -48,7 +48,6 @@ #include "mongo/db/logical_session_id_helpers.h" #include "mongo/db/operation_context.h" #include "mongo/db/stats/top.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/commands/map_reduce_out_options.cpp b/src/mongo/db/commands/map_reduce_out_options.cpp index d8ab3fcfe55..41e0d3b2e7f 100644 --- a/src/mongo/db/commands/map_reduce_out_options.cpp +++ b/src/mongo/db/commands/map_reduce_out_options.cpp @@ -35,7 +35,6 @@ #include "mongo/db/commands/map_reduce_out_options.h" #include "mongo/db/namespace_string.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/commands/mr.cpp b/src/mongo/db/commands/mr.cpp index 05f3d15e2ea..46d4b37b59d 100644 --- a/src/mongo/db/commands/mr.cpp +++ b/src/mongo/db/commands/mr.cpp @@ -76,7 +76,6 @@ #include "mongo/s/stale_exception.h" #include "mongo/scripting/engine.h" #include "mongo/util/debug_util.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/commands/mr_common.cpp b/src/mongo/db/commands/mr_common.cpp index c6ee2483487..bb25a2fa916 100644 --- a/src/mongo/db/commands/mr_common.cpp +++ b/src/mongo/db/commands/mr_common.cpp @@ -57,7 +57,6 @@ #include "mongo/db/query/util/make_data_structure.h" #include "mongo/logv2/log.h" #include "mongo/util/intrusive_counter.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo::map_reduce_common { diff --git a/src/mongo/db/commands/oplog_note.cpp b/src/mongo/db/commands/oplog_note.cpp index b25debc548b..cd8fb90aba6 100644 --- a/src/mongo/db/commands/oplog_note.cpp +++ b/src/mongo/db/commands/oplog_note.cpp @@ -49,7 +49,6 @@ #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/commands/plan_cache_clear_command.cpp b/src/mongo/db/commands/plan_cache_clear_command.cpp index 5eb139aeddf..be77a812338 100644 --- a/src/mongo/db/commands/plan_cache_clear_command.cpp +++ b/src/mongo/db/commands/plan_cache_clear_command.cpp @@ -42,7 +42,7 @@ #include "mongo/db/namespace_string.h" #include "mongo/db/query/collection_query_info.h" #include "mongo/db/query/plan_ranker.h" -#include "mongo/util/log.h" +#include "mongo/logv2/log.h" namespace mongo { namespace { @@ -79,17 +79,30 @@ Status clear(OperationContext* opCtx, Status result = planCache->remove(*cq); if (!result.isOK()) { invariant(result.code() == ErrorCodes::NoSuchKey); - LOG(1) << ns << ": query shape doesn't exist in PlanCache - " - << redact(cq->getQueryObj()) << "(sort: " << cq->getQueryRequest().getSort() - << "; projection: " << cq->getQueryRequest().getProj() - << "; collation: " << cq->getQueryRequest().getCollation() << ")"; + LOGV2_DEBUG(23906, + 1, + "{ns}: query shape doesn't exist in PlanCache - {cq_getQueryObj}(sort: " + "{cq_getQueryRequest_getSort}; projection: {cq_getQueryRequest_getProj}; " + "collation: {cq_getQueryRequest_getCollation})", + "ns"_attr = ns, + "cq_getQueryObj"_attr = redact(cq->getQueryObj()), + "cq_getQueryRequest_getSort"_attr = cq->getQueryRequest().getSort(), + "cq_getQueryRequest_getProj"_attr = cq->getQueryRequest().getProj(), + "cq_getQueryRequest_getCollation"_attr = + cq->getQueryRequest().getCollation()); return Status::OK(); } - LOG(1) << ns << ": removed plan cache entry - " << redact(cq->getQueryObj()) - << "(sort: " << cq->getQueryRequest().getSort() - << "; projection: " << cq->getQueryRequest().getProj() - << "; collation: " << cq->getQueryRequest().getCollation() << ")"; + LOGV2_DEBUG(23907, + 1, + "{ns}: removed plan cache entry - {cq_getQueryObj}(sort: " + "{cq_getQueryRequest_getSort}; projection: {cq_getQueryRequest_getProj}; " + "collation: {cq_getQueryRequest_getCollation})", + "ns"_attr = ns, + "cq_getQueryObj"_attr = redact(cq->getQueryObj()), + "cq_getQueryRequest_getSort"_attr = cq->getQueryRequest().getSort(), + "cq_getQueryRequest_getProj"_attr = cq->getQueryRequest().getProj(), + "cq_getQueryRequest_getCollation"_attr = cq->getQueryRequest().getCollation()); return Status::OK(); } @@ -104,7 +117,7 @@ Status clear(OperationContext* opCtx, planCache->clear(); - LOG(1) << ns << ": cleared plan cache"; + LOGV2_DEBUG(23908, 1, "{ns}: cleared plan cache", "ns"_attr = ns); return Status::OK(); } diff --git a/src/mongo/db/commands/resize_oplog.cpp b/src/mongo/db/commands/resize_oplog.cpp index 7a2e8a4aa8f..acdf997c9ab 100644 --- a/src/mongo/db/commands/resize_oplog.cpp +++ b/src/mongo/db/commands/resize_oplog.cpp @@ -43,7 +43,6 @@ #include "mongo/db/operation_context.h" #include "mongo/db/storage/durable_catalog.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/commands/run_aggregate.cpp b/src/mongo/db/commands/run_aggregate.cpp index a61456df9c8..ad65b9d9a48 100644 --- a/src/mongo/db/commands/run_aggregate.cpp +++ b/src/mongo/db/commands/run_aggregate.cpp @@ -72,7 +72,6 @@ #include "mongo/db/views/view.h" #include "mongo/db/views/view_catalog.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/string_map.h" diff --git a/src/mongo/db/commands/rwc_defaults_commands.cpp b/src/mongo/db/commands/rwc_defaults_commands.cpp index 0cbf5636a09..ece0fb09163 100644 --- a/src/mongo/db/commands/rwc_defaults_commands.cpp +++ b/src/mongo/db/commands/rwc_defaults_commands.cpp @@ -42,7 +42,6 @@ #include "mongo/db/repl/replication_coordinator.h" #include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/commands/server_status.cpp b/src/mongo/db/commands/server_status.cpp index b7469ceb8fd..b4a5b9bddf5 100644 --- a/src/mongo/db/commands/server_status.cpp +++ b/src/mongo/db/commands/server_status.cpp @@ -38,7 +38,6 @@ #include "mongo/db/service_context.h" #include "mongo/db/stats/counters.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/net/http_client.h" #include "mongo/util/net/socket_utils.h" #include "mongo/util/version.h" 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 7904e8db864..b8794e24eb2 100644 --- a/src/mongo/db/commands/set_feature_compatibility_version_command.cpp +++ b/src/mongo/db/commands/set_feature_compatibility_version_command.cpp @@ -62,7 +62,6 @@ #include "mongo/s/grid.h" #include "mongo/util/exit.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/commands/set_index_commit_quorum_command.cpp b/src/mongo/db/commands/set_index_commit_quorum_command.cpp index 2c0555442db..b60332a6035 100644 --- a/src/mongo/db/commands/set_index_commit_quorum_command.cpp +++ b/src/mongo/db/commands/set_index_commit_quorum_command.cpp @@ -39,7 +39,6 @@ #include "mongo/db/commands/set_index_commit_quorum_gen.h" #include "mongo/db/index_builds_coordinator.h" #include "mongo/db/write_concern_options.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/commands/sleep_command.cpp b/src/mongo/db/commands/sleep_command.cpp index c7c74a1c01f..9884aa23b39 100644 --- a/src/mongo/db/commands/sleep_command.cpp +++ b/src/mongo/db/commands/sleep_command.cpp @@ -36,7 +36,6 @@ #include "mongo/db/concurrency/d_concurrency.h" #include "mongo/db/concurrency/lock_manager_defs.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/commands/test_commands.cpp b/src/mongo/db/commands/test_commands.cpp index bf5f1101fcc..51fc8a2ee35 100644 --- a/src/mongo/db/commands/test_commands.cpp +++ b/src/mongo/db/commands/test_commands.cpp @@ -46,7 +46,6 @@ #include "mongo/db/query/internal_plans.h" #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/commands/traffic_recording_cmds.cpp b/src/mongo/db/commands/traffic_recording_cmds.cpp index 9cb02bcf45a..fcae9d77245 100644 --- a/src/mongo/db/commands/traffic_recording_cmds.cpp +++ b/src/mongo/db/commands/traffic_recording_cmds.cpp @@ -39,7 +39,6 @@ #include "mongo/db/traffic_recorder.h" #include "mongo/db/traffic_recorder_gen.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/commands/txn_cmds.cpp b/src/mongo/db/commands/txn_cmds.cpp index 91dfc7fa8dd..f3b7d32b54c 100644 --- a/src/mongo/db/commands/txn_cmds.cpp +++ b/src/mongo/db/commands/txn_cmds.cpp @@ -45,7 +45,6 @@ #include "mongo/db/transaction_participant.h" #include "mongo/db/transaction_validation.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/commands/user_management_commands.cpp b/src/mongo/db/commands/user_management_commands.cpp index 2ccf5d6d97f..e6eaa321fff 100644 --- a/src/mongo/db/commands/user_management_commands.cpp +++ b/src/mongo/db/commands/user_management_commands.cpp @@ -73,7 +73,6 @@ #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/stdx/unordered_set.h" #include "mongo/util/icu.h" -#include "mongo/util/log.h" #include "mongo/util/net/ssl_manager.h" #include "mongo/util/password_digest.h" #include "mongo/util/sequence_util.h" diff --git a/src/mongo/db/commands/user_management_commands_common.cpp b/src/mongo/db/commands/user_management_commands_common.cpp index 08e4e5345c1..36d6963074f 100644 --- a/src/mongo/db/commands/user_management_commands_common.cpp +++ b/src/mongo/db/commands/user_management_commands_common.cpp @@ -46,7 +46,6 @@ #include "mongo/db/auth/user.h" #include "mongo/db/auth/user_management_commands_parser.h" #include "mongo/db/jsobj.h" -#include "mongo/util/log.h" #include "mongo/util/sequence_util.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/commands/validate.cpp b/src/mongo/db/commands/validate.cpp index f6b32d28eab..81d9c35de70 100644 --- a/src/mongo/db/commands/validate.cpp +++ b/src/mongo/db/commands/validate.cpp @@ -40,7 +40,6 @@ #include "mongo/db/storage/record_store.h" #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { 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 8c4434981b9..cd4ee962525 100644 --- a/src/mongo/db/commands/vote_commit_index_build_command.cpp +++ b/src/mongo/db/commands/vote_commit_index_build_command.cpp @@ -36,7 +36,6 @@ #include "mongo/db/commands/vote_commit_index_build_gen.h" #include "mongo/db/index_builds_coordinator.h" #include "mongo/db/repl/repl_client_info.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/commands/whats_my_sni_command.cpp b/src/mongo/db/commands/whats_my_sni_command.cpp index 0b758235c8b..64c41d86882 100644 --- a/src/mongo/db/commands/whats_my_sni_command.cpp +++ b/src/mongo/db/commands/whats_my_sni_command.cpp @@ -30,7 +30,6 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kCommand #include "mongo/db/commands.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/concurrency/d_concurrency.cpp b/src/mongo/db/concurrency/d_concurrency.cpp index 3e0018aa3d0..f22a26332c1 100644 --- a/src/mongo/db/concurrency/d_concurrency.cpp +++ b/src/mongo/db/concurrency/d_concurrency.cpp @@ -43,7 +43,6 @@ #include "mongo/db/service_context.h" #include "mongo/platform/mutex.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/stacktrace.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/concurrency/d_concurrency_test.cpp b/src/mongo/db/concurrency/d_concurrency_test.cpp index 8d00a0f1f44..0097c424764 100644 --- a/src/mongo/db/concurrency/d_concurrency_test.cpp +++ b/src/mongo/db/concurrency/d_concurrency_test.cpp @@ -49,7 +49,6 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/concurrency/ticketholder.h" #include "mongo/util/debug_util.h" -#include "mongo/util/log.h" #include "mongo/util/progress_meter.h" #include "mongo/util/scopeguard.h" #include "mongo/util/time_support.h" diff --git a/src/mongo/db/concurrency/deferred_writer.cpp b/src/mongo/db/concurrency/deferred_writer.cpp index b06d4faa127..bcd8bd8814c 100644 --- a/src/mongo/db/concurrency/deferred_writer.cpp +++ b/src/mongo/db/concurrency/deferred_writer.cpp @@ -38,7 +38,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/concurrency/idle_thread_block.h" #include "mongo/util/concurrency/thread_pool.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/concurrency/flow_control_ticketholder.cpp b/src/mongo/db/concurrency/flow_control_ticketholder.cpp index a11c4b399c4..fcaffbccb4a 100644 --- a/src/mongo/db/concurrency/flow_control_ticketholder.cpp +++ b/src/mongo/db/concurrency/flow_control_ticketholder.cpp @@ -35,7 +35,6 @@ #include "mongo/db/operation_context.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/db/concurrency/lock_manager.cpp b/src/mongo/db/concurrency/lock_manager.cpp index b27c632c7ee..fb93ab93d29 100644 --- a/src/mongo/db/concurrency/lock_manager.cpp +++ b/src/mongo/db/concurrency/lock_manager.cpp @@ -43,7 +43,6 @@ #include "mongo/db/concurrency/locker.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/timer.h" diff --git a/src/mongo/db/concurrency/lock_state.cpp b/src/mongo/db/concurrency/lock_state.cpp index 2b2f104dacc..4559b1ae465 100644 --- a/src/mongo/db/concurrency/lock_state.cpp +++ b/src/mongo/db/concurrency/lock_state.cpp @@ -46,7 +46,6 @@ #include "mongo/util/concurrency/ticketholder.h" #include "mongo/util/debug_util.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/concurrency/lock_state_test.cpp b/src/mongo/db/concurrency/lock_state_test.cpp index 95e907260ef..eba632fb4aa 100644 --- a/src/mongo/db/concurrency/lock_state_test.cpp +++ b/src/mongo/db/concurrency/lock_state_test.cpp @@ -43,7 +43,6 @@ #include "mongo/transport/transport_layer_mock.h" #include "mongo/unittest/unittest.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/timer.h" namespace mongo { diff --git a/src/mongo/db/concurrency/write_conflict_exception.cpp b/src/mongo/db/concurrency/write_conflict_exception.cpp index 780bed95cf2..0bfafc48fb2 100644 --- a/src/mongo/db/concurrency/write_conflict_exception.cpp +++ b/src/mongo/db/concurrency/write_conflict_exception.cpp @@ -30,7 +30,6 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kWrite #include "mongo/db/concurrency/write_conflict_exception.h" -#include "mongo/util/log.h" #include "mongo/util/log_and_backoff.h" #include "mongo/util/stacktrace.h" diff --git a/src/mongo/db/cursor_manager.cpp b/src/mongo/db/cursor_manager.cpp index 6092fcbffbc..50f449984b7 100644 --- a/src/mongo/db/cursor_manager.cpp +++ b/src/mongo/db/cursor_manager.cpp @@ -55,7 +55,6 @@ #include "mongo/logv2/log.h" #include "mongo/platform/random.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/database_index_builds_tracker.cpp b/src/mongo/db/database_index_builds_tracker.cpp index c8d21639050..313f5fa9a5b 100644 --- a/src/mongo/db/database_index_builds_tracker.cpp +++ b/src/mongo/db/database_index_builds_tracker.cpp @@ -35,7 +35,6 @@ #include "mongo/db/catalog/index_builds_manager.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/db_raii.cpp b/src/mongo/db/db_raii.cpp index 07b4c52c2bf..906a2c61645 100644 --- a/src/mongo/db/db_raii.cpp +++ b/src/mongo/db/db_raii.cpp @@ -40,7 +40,6 @@ #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/s/collection_sharding_state.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/db_raii_test.cpp b/src/mongo/db/db_raii_test.cpp index 9df8b19356f..d573bda4e95 100644 --- a/src/mongo/db/db_raii_test.cpp +++ b/src/mongo/db/db_raii_test.cpp @@ -39,7 +39,6 @@ #include "mongo/db/db_raii.h" #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/db/dbdirectclient.cpp b/src/mongo/db/dbdirectclient.cpp index 24e157eb323..84818dcf8c4 100644 --- a/src/mongo/db/dbdirectclient.cpp +++ b/src/mongo/db/dbdirectclient.cpp @@ -43,7 +43,6 @@ #include "mongo/db/wire_version.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/transport/service_entry_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/dbhelpers.cpp b/src/mongo/db/dbhelpers.cpp index e7748aa1e9a..8ad65f8d2f3 100644 --- a/src/mongo/db/dbhelpers.cpp +++ b/src/mongo/db/dbhelpers.cpp @@ -53,7 +53,6 @@ #include "mongo/db/service_context.h" #include "mongo/db/write_concern.h" #include "mongo/db/write_concern_options.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/exec/cached_plan.cpp b/src/mongo/db/exec/cached_plan.cpp index 1467eed69a6..f3032d54da9 100644 --- a/src/mongo/db/exec/cached_plan.cpp +++ b/src/mongo/db/exec/cached_plan.cpp @@ -49,7 +49,6 @@ #include "mongo/db/query/query_planner.h" #include "mongo/db/query/stage_builder.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/transitional_tools_do_not_use/vector_spooling.h" diff --git a/src/mongo/db/exec/collection_scan.cpp b/src/mongo/db/exec/collection_scan.cpp index 987d3ea69f3..7bf43b24d7f 100644 --- a/src/mongo/db/exec/collection_scan.cpp +++ b/src/mongo/db/exec/collection_scan.cpp @@ -45,7 +45,6 @@ #include "mongo/db/storage/oplog_hack.h" #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/db/client.h" // XXX-ERH diff --git a/src/mongo/db/exec/delete.cpp b/src/mongo/db/exec/delete.cpp index 702ecc68d5a..4e5678defcc 100644 --- a/src/mongo/db/exec/delete.cpp +++ b/src/mongo/db/exec/delete.cpp @@ -45,7 +45,6 @@ #include "mongo/db/query/canonical_query.h" #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/service_context.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { 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 d6039cba5a4..86fb3f17686 100644 --- a/src/mongo/db/exec/document_value/document_value_test.cpp +++ b/src/mongo/db/exec/document_value/document_value_test.cpp @@ -44,7 +44,6 @@ #include "mongo/db/pipeline/field_path.h" #include "mongo/dbtests/dbtests.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace DocumentTests { diff --git a/src/mongo/db/exec/geo_near.cpp b/src/mongo/db/exec/geo_near.cpp index 0ec4d890707..6e2b86df096 100644 --- a/src/mongo/db/exec/geo_near.cpp +++ b/src/mongo/db/exec/geo_near.cpp @@ -49,7 +49,6 @@ #include "mongo/db/matcher/expression.h" #include "mongo/db/query/expression_index.h" #include "mongo/db/query/expression_index_knobs_gen.h" -#include "mongo/util/log.h" #include diff --git a/src/mongo/db/exec/inclusion_projection_executor_test.cpp b/src/mongo/db/exec/inclusion_projection_executor_test.cpp index 862675bc657..9996d697cb0 100644 --- a/src/mongo/db/exec/inclusion_projection_executor_test.cpp +++ b/src/mongo/db/exec/inclusion_projection_executor_test.cpp @@ -48,7 +48,6 @@ #include "mongo/db/query/projection_parser.h" #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo::projection_executor { namespace { diff --git a/src/mongo/db/exec/index_scan.cpp b/src/mongo/db/exec/index_scan.cpp index 506ab6500e0..5277d85a9e3 100644 --- a/src/mongo/db/exec/index_scan.cpp +++ b/src/mongo/db/exec/index_scan.cpp @@ -42,7 +42,6 @@ #include "mongo/db/index/index_access_method.h" #include "mongo/db/index_names.h" #include "mongo/db/query/index_bounds_builder.h" -#include "mongo/util/log.h" namespace { diff --git a/src/mongo/db/exec/multi_plan.cpp b/src/mongo/db/exec/multi_plan.cpp index be859d79e1c..96d691fdbb7 100644 --- a/src/mongo/db/exec/multi_plan.cpp +++ b/src/mongo/db/exec/multi_plan.cpp @@ -49,7 +49,6 @@ #include "mongo/db/query/plan_cache.h" #include "mongo/db/query/plan_ranker.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/exec/projection.cpp b/src/mongo/db/exec/projection.cpp index ecf20579300..6051f738c84 100644 --- a/src/mongo/db/exec/projection.cpp +++ b/src/mongo/db/exec/projection.cpp @@ -43,7 +43,6 @@ #include "mongo/db/matcher/expression.h" #include "mongo/db/record_id.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/exec/projection_executor_builder_test.cpp b/src/mongo/db/exec/projection_executor_builder_test.cpp index ecdd29d44fc..c5c4f1240bc 100644 --- a/src/mongo/db/exec/projection_executor_builder_test.cpp +++ b/src/mongo/db/exec/projection_executor_builder_test.cpp @@ -41,7 +41,6 @@ #include "mongo/db/query/projection_parser.h" #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo::projection_executor { namespace { diff --git a/src/mongo/db/exec/shard_filter.cpp b/src/mongo/db/exec/shard_filter.cpp index ed28c9f890c..51c67dfe697 100644 --- a/src/mongo/db/exec/shard_filter.cpp +++ b/src/mongo/db/exec/shard_filter.cpp @@ -40,7 +40,6 @@ #include "mongo/db/exec/working_set_common.h" #include "mongo/logv2/log.h" #include "mongo/s/shard_key_pattern.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/exec/sort_key_generator.cpp b/src/mongo/db/exec/sort_key_generator.cpp index 0d18dc37d7b..98e2774a747 100644 --- a/src/mongo/db/exec/sort_key_generator.cpp +++ b/src/mongo/db/exec/sort_key_generator.cpp @@ -43,7 +43,6 @@ #include "mongo/db/exec/working_set_common.h" #include "mongo/db/matcher/extensions_callback_noop.h" #include "mongo/db/query/collation/collator_interface.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/exec/stagedebug_cmd.cpp b/src/mongo/db/exec/stagedebug_cmd.cpp index 5867bbb0b96..34190125c51 100644 --- a/src/mongo/db/exec/stagedebug_cmd.cpp +++ b/src/mongo/db/exec/stagedebug_cmd.cpp @@ -64,7 +64,6 @@ #include "mongo/db/namespace_string.h" #include "mongo/db/query/plan_executor.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/exec/subplan.cpp b/src/mongo/db/exec/subplan.cpp index dc9b66466b8..32c4cfa0bb8 100644 --- a/src/mongo/db/exec/subplan.cpp +++ b/src/mongo/db/exec/subplan.cpp @@ -48,7 +48,6 @@ #include "mongo/db/query/query_planner_common.h" #include "mongo/db/query/stage_builder.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/transitional_tools_do_not_use/vector_spooling.h" diff --git a/src/mongo/db/exec/trial_stage.cpp b/src/mongo/db/exec/trial_stage.cpp index 4220631d974..a9e6c678000 100644 --- a/src/mongo/db/exec/trial_stage.cpp +++ b/src/mongo/db/exec/trial_stage.cpp @@ -41,7 +41,6 @@ #include "mongo/db/exec/queued_data_stage.h" #include "mongo/db/exec/working_set_common.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/exec/update_stage.cpp b/src/mongo/db/exec/update_stage.cpp index 6ff31d7bf77..829ed4fd95f 100644 --- a/src/mongo/db/exec/update_stage.cpp +++ b/src/mongo/db/exec/update_stage.cpp @@ -56,7 +56,6 @@ #include "mongo/s/shard_key_pattern.h" #include "mongo/s/would_change_owning_shard_exception.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/exec/working_set_common.cpp b/src/mongo/db/exec/working_set_common.cpp index c38ffecb2cc..a481d0df533 100644 --- a/src/mongo/db/exec/working_set_common.cpp +++ b/src/mongo/db/exec/working_set_common.cpp @@ -41,6 +41,7 @@ #include "mongo/db/index/index_access_method.h" #include "mongo/db/query/canonical_query.h" #include "mongo/db/service_context.h" +#include "mongo/logger/redaction.h" #include "mongo/logv2/log.h" namespace mongo { diff --git a/src/mongo/db/exhaust_cursor_currentop_integration_test.cpp b/src/mongo/db/exhaust_cursor_currentop_integration_test.cpp index 677f5ec18b3..53e97568da1 100644 --- a/src/mongo/db/exhaust_cursor_currentop_integration_test.cpp +++ b/src/mongo/db/exhaust_cursor_currentop_integration_test.cpp @@ -39,7 +39,6 @@ #include "mongo/stdx/future.h" #include "mongo/unittest/integration_test.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" #include "mongo/util/system_clock_source.h" namespace mongo { diff --git a/src/mongo/db/free_mon/free_mon_controller.cpp b/src/mongo/db/free_mon/free_mon_controller.cpp index 895a278a57b..7f18b20e3a0 100644 --- a/src/mongo/db/free_mon/free_mon_controller.cpp +++ b/src/mongo/db/free_mon/free_mon_controller.cpp @@ -36,7 +36,6 @@ #include "mongo/db/ftdc/collector.h" #include "mongo/logger/logstream_builder.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { 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 afb05e22f9f..a7657ca33a6 100644 --- a/src/mongo/db/free_mon/free_mon_controller_test.cpp +++ b/src/mongo/db/free_mon/free_mon_controller_test.cpp @@ -68,7 +68,6 @@ #include "mongo/unittest/temp_dir.h" #include "mongo/unittest/unittest.h" #include "mongo/util/clock_source.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/free_mon/free_mon_mongod.cpp b/src/mongo/db/free_mon/free_mon_mongod.cpp index 79b2769068e..d663191b569 100644 --- a/src/mongo/db/free_mon/free_mon_mongod.cpp +++ b/src/mongo/db/free_mon/free_mon_mongod.cpp @@ -65,7 +65,6 @@ #include "mongo/util/assert_util.h" #include "mongo/util/concurrency/thread_pool.h" #include "mongo/util/future.h" -#include "mongo/util/log.h" #include "mongo/util/net/http_client.h" namespace mongo { diff --git a/src/mongo/db/free_mon/free_mon_options.cpp b/src/mongo/db/free_mon/free_mon_options.cpp index 43793e7826a..626bf3b74b6 100644 --- a/src/mongo/db/free_mon/free_mon_options.cpp +++ b/src/mongo/db/free_mon/free_mon_options.cpp @@ -39,7 +39,6 @@ #include "mongo/base/status.h" #include "mongo/base/status_with.h" #include "mongo/base/string_data.h" -#include "mongo/util/log.h" #include "mongo/util/options_parser/startup_option_init.h" #include "mongo/util/options_parser/startup_options.h" diff --git a/src/mongo/db/free_mon/free_mon_processor.cpp b/src/mongo/db/free_mon/free_mon_processor.cpp index 469488ba029..6eb6f0f1a60 100644 --- a/src/mongo/db/free_mon/free_mon_processor.cpp +++ b/src/mongo/db/free_mon/free_mon_processor.cpp @@ -48,7 +48,6 @@ #include "mongo/idl/idl_parser.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/ftdc/controller.cpp b/src/mongo/db/ftdc/controller.cpp index 47acae27edf..6da89b00104 100644 --- a/src/mongo/db/ftdc/controller.cpp +++ b/src/mongo/db/ftdc/controller.cpp @@ -45,7 +45,6 @@ #include "mongo/stdx/thread.h" #include "mongo/util/concurrency/idle_thread_block.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/db/ftdc/file_manager.cpp b/src/mongo/db/ftdc/file_manager.cpp index 783e9793c55..dbe83579f4b 100644 --- a/src/mongo/db/ftdc/file_manager.cpp +++ b/src/mongo/db/ftdc/file_manager.cpp @@ -45,7 +45,6 @@ #include "mongo/db/jsobj.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/time_support.h" diff --git a/src/mongo/db/ftdc/file_manager_test.cpp b/src/mongo/db/ftdc/file_manager_test.cpp index c8fba1ddd2c..0f48f795973 100644 --- a/src/mongo/db/ftdc/file_manager_test.cpp +++ b/src/mongo/db/ftdc/file_manager_test.cpp @@ -51,7 +51,6 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/temp_dir.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/ftdc/file_writer.cpp b/src/mongo/db/ftdc/file_writer.cpp index 24a6bf4cb17..3eaded126d2 100644 --- a/src/mongo/db/ftdc/file_writer.cpp +++ b/src/mongo/db/ftdc/file_writer.cpp @@ -43,7 +43,6 @@ #include "mongo/db/ftdc/util.h" #include "mongo/db/jsobj.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/ftdc/ftdc_mongos.cpp b/src/mongo/db/ftdc/ftdc_mongos.cpp index e45c8031d6e..1eb5015bb8f 100644 --- a/src/mongo/db/ftdc/ftdc_mongos.cpp +++ b/src/mongo/db/ftdc/ftdc_mongos.cpp @@ -42,9 +42,9 @@ #include "mongo/db/repl/replication_coordinator.h" #include "mongo/executor/connection_pool_stats.h" #include "mongo/executor/task_executor_pool.h" +#include "mongo/logv2/log.h" #include "mongo/s/grid.h" #include "mongo/stdx/thread.h" -#include "mongo/util/log.h" #include "mongo/util/synchronized_value.h" namespace mongo { @@ -108,8 +108,9 @@ void startMongoSFTDC() { if (directory.empty()) { if (serverGlobalParams.logpath.empty()) { - warning() << "FTDC is disabled because neither '--logpath' nor set parameter " - "'diagnosticDataCollectionDirectoryPath' are specified."; + LOGV2_WARNING(23911, + "FTDC is disabled because neither '--logpath' nor set parameter " + "'diagnosticDataCollectionDirectoryPath' are specified."); startMode = FTDCStartMode::kSkipStart; } else { directory = boost::filesystem::absolute( diff --git a/src/mongo/db/ftdc/ftdc_system_stats_windows.cpp b/src/mongo/db/ftdc/ftdc_system_stats_windows.cpp index cf2ac6a4e61..7b923f2465d 100644 --- a/src/mongo/db/ftdc/ftdc_system_stats_windows.cpp +++ b/src/mongo/db/ftdc/ftdc_system_stats_windows.cpp @@ -43,7 +43,6 @@ #include "mongo/db/ftdc/collector.h" #include "mongo/db/ftdc/controller.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/perfctr_collect.h" namespace mongo { diff --git a/src/mongo/db/ftdc/util.cpp b/src/mongo/db/ftdc/util.cpp index a1442ec8b6f..9a9c6a7cc8a 100644 --- a/src/mongo/db/ftdc/util.cpp +++ b/src/mongo/db/ftdc/util.cpp @@ -44,7 +44,6 @@ #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/time_support.h" diff --git a/src/mongo/db/fts/fts_index_format_test.cpp b/src/mongo/db/fts/fts_index_format_test.cpp index 46b10c81228..22ecc4581a6 100644 --- a/src/mongo/db/fts/fts_index_format_test.cpp +++ b/src/mongo/db/fts/fts_index_format_test.cpp @@ -38,7 +38,6 @@ #include "mongo/db/fts/fts_index_format.h" #include "mongo/db/fts/fts_spec.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/geo/geoparser.cpp b/src/mongo/db/geo/geoparser.cpp index 1d8fef041ce..946259dbdff 100644 --- a/src/mongo/db/geo/geoparser.cpp +++ b/src/mongo/db/geo/geoparser.cpp @@ -39,7 +39,6 @@ #include "mongo/db/bson/dotted_path_support.h" #include "mongo/db/geo/shapes.h" #include "mongo/db/jsobj.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/transitional_tools_do_not_use/vector_spooling.h" #include "third_party/s2/s2polygonbuilder.h" diff --git a/src/mongo/db/geo/r2_region_coverer.cpp b/src/mongo/db/geo/r2_region_coverer.cpp index c1c6b06c28d..8ede6abc923 100644 --- a/src/mongo/db/geo/r2_region_coverer.cpp +++ b/src/mongo/db/geo/r2_region_coverer.cpp @@ -36,7 +36,6 @@ #include "mongo/db/geo/r2_region_coverer.h" #include "mongo/db/geo/shapes.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/geo/r2_region_coverer_test.cpp b/src/mongo/db/geo/r2_region_coverer_test.cpp index 394698b1d47..54d07ba6c4b 100644 --- a/src/mongo/db/geo/r2_region_coverer_test.cpp +++ b/src/mongo/db/geo/r2_region_coverer_test.cpp @@ -41,7 +41,6 @@ #include "mongo/logv2/log.h" #include "mongo/platform/random.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace { diff --git a/src/mongo/db/index/2d_key_generator_test.cpp b/src/mongo/db/index/2d_key_generator_test.cpp index 88556e0b58e..0c1b923472c 100644 --- a/src/mongo/db/index/2d_key_generator_test.cpp +++ b/src/mongo/db/index/2d_key_generator_test.cpp @@ -42,7 +42,6 @@ #include "mongo/db/json.h" #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" using namespace mongo; diff --git a/src/mongo/db/index/btree_key_generator_test.cpp b/src/mongo/db/index/btree_key_generator_test.cpp index 4607d217de4..3c7c0775255 100644 --- a/src/mongo/db/index/btree_key_generator_test.cpp +++ b/src/mongo/db/index/btree_key_generator_test.cpp @@ -41,7 +41,6 @@ #include "mongo/db/query/collation/collator_interface_mock.h" #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" using namespace mongo; using std::cout; diff --git a/src/mongo/db/index/duplicate_key_tracker.cpp b/src/mongo/db/index/duplicate_key_tracker.cpp index fc1d3604f90..97d6ae3ab25 100644 --- a/src/mongo/db/index/duplicate_key_tracker.cpp +++ b/src/mongo/db/index/duplicate_key_tracker.cpp @@ -39,7 +39,6 @@ #include "mongo/db/keypattern.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/index/expression_keys_private.cpp b/src/mongo/db/index/expression_keys_private.cpp index a9ef9f1ba30..ce38e6d0092 100644 --- a/src/mongo/db/index/expression_keys_private.cpp +++ b/src/mongo/db/index/expression_keys_private.cpp @@ -48,7 +48,6 @@ #include "mongo/db/query/collation/collation_index_key.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "third_party/s2/s2cell.h" diff --git a/src/mongo/db/index/hash_key_generator_test.cpp b/src/mongo/db/index/hash_key_generator_test.cpp index c75e526ae47..c67f9302b40 100644 --- a/src/mongo/db/index/hash_key_generator_test.cpp +++ b/src/mongo/db/index/hash_key_generator_test.cpp @@ -42,7 +42,6 @@ #include "mongo/db/query/collation/collator_interface_mock.h" #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" using namespace mongo; diff --git a/src/mongo/db/index/haystack_access_method.cpp b/src/mongo/db/index/haystack_access_method.cpp index 98a04d22d89..a216f8580be 100644 --- a/src/mongo/db/index/haystack_access_method.cpp +++ b/src/mongo/db/index/haystack_access_method.cpp @@ -45,7 +45,6 @@ #include "mongo/db/jsobj.h" #include "mongo/db/query/internal_plans.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { 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 bff506b0023..93328fa7c83 100644 --- a/src/mongo/db/index/index_access_method_factory_impl.cpp +++ b/src/mongo/db/index/index_access_method_factory_impl.cpp @@ -41,7 +41,6 @@ #include "mongo/db/index/s2_access_method.h" #include "mongo/db/index/wildcard_access_method.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/index/index_build_interceptor.cpp b/src/mongo/db/index/index_build_interceptor.cpp index 8ca9bf0fd20..dd8c6ac852b 100644 --- a/src/mongo/db/index/index_build_interceptor.cpp +++ b/src/mongo/db/index/index_build_interceptor.cpp @@ -48,7 +48,6 @@ #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/progress_meter.h" #include "mongo/util/uuid.h" diff --git a/src/mongo/db/index/index_descriptor.cpp b/src/mongo/db/index/index_descriptor.cpp index 77478c7e6a6..248e87e8b91 100644 --- a/src/mongo/db/index/index_descriptor.cpp +++ b/src/mongo/db/index/index_descriptor.cpp @@ -38,7 +38,6 @@ #include #include "mongo/bson/simple_bsonelement_comparator.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/index/s2_access_method.cpp b/src/mongo/db/index/s2_access_method.cpp index 8db6683b567..a36b130d656 100644 --- a/src/mongo/db/index/s2_access_method.cpp +++ b/src/mongo/db/index/s2_access_method.cpp @@ -42,7 +42,6 @@ #include "mongo/db/index_names.h" #include "mongo/db/jsobj.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/index/s2_key_generator_test.cpp b/src/mongo/db/index/s2_key_generator_test.cpp index 40ec009fcc3..f5c24fb1687 100644 --- a/src/mongo/db/index/s2_key_generator_test.cpp +++ b/src/mongo/db/index/s2_key_generator_test.cpp @@ -43,7 +43,6 @@ #include "mongo/db/query/collation/collator_interface_mock.h" #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" using namespace mongo; diff --git a/src/mongo/db/index/skipped_record_tracker.cpp b/src/mongo/db/index/skipped_record_tracker.cpp index c3ef41e8e32..d9442b52540 100644 --- a/src/mongo/db/index/skipped_record_tracker.cpp +++ b/src/mongo/db/index/skipped_record_tracker.cpp @@ -34,7 +34,7 @@ #include "mongo/db/catalog/collection.h" #include "mongo/db/curop.h" #include "mongo/db/index/index_access_method.h" -#include "mongo/util/log.h" +#include "mongo/logv2/log.h" namespace mongo { namespace { @@ -115,7 +115,11 @@ Status SkippedRecordTracker::retrySkippedRecords(OperationContext* opCtx, auto skippedRecord = collCursor->seekExact(skippedRecordId); if (skippedRecord) { const auto skippedDoc = skippedRecord->data.toBson(); - LOG(2) << "reapplying skipped RecordID " << skippedRecordId << ": " << skippedDoc; + LOGV2_DEBUG(23882, + 2, + "reapplying skipped RecordID {skippedRecordId}: {skippedDoc}", + "skippedRecordId"_attr = skippedRecordId, + "skippedDoc"_attr = skippedDoc); try { // Because constraint enforcement is set, this will throw if there are any indexing @@ -145,8 +149,13 @@ Status SkippedRecordTracker::retrySkippedRecords(OperationContext* opCtx, progress->finished(); int logLevel = (resolved > 0) ? 0 : 1; - LOG(logLevel) << "index build: reapplied " << resolved << " skipped records for index: " - << _indexCatalogEntry->descriptor()->indexName(); + LOGV2_DEBUG(23883, + logSeverityV1toV2(logLevel).toInt(), + "index build: reapplied {resolved} skipped records for index: " + "{indexCatalogEntry_descriptor_indexName}", + "resolved"_attr = resolved, + "indexCatalogEntry_descriptor_indexName"_attr = + _indexCatalogEntry->descriptor()->indexName()); return Status::OK(); } diff --git a/src/mongo/db/index/wildcard_key_generator_test.cpp b/src/mongo/db/index/wildcard_key_generator_test.cpp index 4a3233caa04..5266f570bed 100644 --- a/src/mongo/db/index/wildcard_key_generator_test.cpp +++ b/src/mongo/db/index/wildcard_key_generator_test.cpp @@ -36,7 +36,6 @@ #include "mongo/db/query/collation/collator_interface_mock.h" #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/index_build_entry_helpers.cpp b/src/mongo/db/index_build_entry_helpers.cpp index 497be488d47..1dce7f5b2c4 100644 --- a/src/mongo/db/index_build_entry_helpers.cpp +++ b/src/mongo/db/index_build_entry_helpers.cpp @@ -53,7 +53,6 @@ #include "mongo/db/query/query_request.h" #include "mongo/db/record_id.h" #include "mongo/db/storage/write_unit_of_work.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/uuid.h" diff --git a/src/mongo/db/index_builds_coordinator.cpp b/src/mongo/db/index_builds_coordinator.cpp index 4d71a91c8a5..c72ad47ad84 100644 --- a/src/mongo/db/index_builds_coordinator.cpp +++ b/src/mongo/db/index_builds_coordinator.cpp @@ -59,7 +59,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/shard_key_pattern.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { @@ -517,7 +516,9 @@ std::vector IndexBuildsCoordinator::_abortCollectionIndexBuilds(stdx::uniq return {}; } - log() << "About to abort all index builders on collection with UUID: " << collectionUUID; + LOGV2(23879, + "About to abort all index builders on collection with UUID: {collectionUUID}", + "collectionUUID"_attr = collectionUUID); std::vector buildUUIDs = collIndexBuildsIt->second->getIndexBuildUUIDs(lk); collIndexBuildsIt->second->runOperationOnAllBuilds( @@ -732,9 +733,12 @@ boost::optional IndexBuildsCoordinator::abortIndexBuildByIndexNamesNoWait( return; } - log() << "About to abort index builder: " << replState->buildUUID - << " on collection: " << collectionUUID - << ". First index: " << replState->indexNames.front(); + LOGV2(23880, + "About to abort index builder: {replState_buildUUID} on collection: " + "{collectionUUID}. First index: {replState_indexNames_front}", + "replState_buildUUID"_attr = replState->buildUUID, + "collectionUUID"_attr = collectionUUID, + "replState_indexNames_front"_attr = replState->indexNames.front()); if (this->abortIndexBuildByBuildUUIDNoWait( opCtx, replState->buildUUID, abortTimestamp, reason)) { diff --git a/src/mongo/db/index_builds_coordinator_mongod.cpp b/src/mongo/db/index_builds_coordinator_mongod.cpp index cc915a7a6c3..bf06151e5f7 100644 --- a/src/mongo/db/index_builds_coordinator_mongod.cpp +++ b/src/mongo/db/index_builds_coordinator_mongod.cpp @@ -42,7 +42,6 @@ #include "mongo/db/service_context.h" #include "mongo/util/assert_util.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/introspect.cpp b/src/mongo/db/introspect.cpp index 87819671ad4..24e4a89a275 100644 --- a/src/mongo/db/introspect.cpp +++ b/src/mongo/db/introspect.cpp @@ -45,7 +45,6 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/metadata/client_metadata.h" #include "mongo/rpc/metadata/client_metadata_ismaster.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/keys_collection_client_direct.cpp b/src/mongo/db/keys_collection_client_direct.cpp index 817b380ec41..54bfae060ba 100644 --- a/src/mongo/db/keys_collection_client_direct.cpp +++ b/src/mongo/db/keys_collection_client_direct.cpp @@ -50,7 +50,6 @@ #include "mongo/s/catalog/sharding_catalog_client.h" #include "mongo/s/write_ops/batched_command_request.h" #include "mongo/s/write_ops/batched_command_response.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/keys_collection_manager.cpp b/src/mongo/db/keys_collection_manager.cpp index 4a9238c5f2d..eaf90961905 100644 --- a/src/mongo/db/keys_collection_manager.cpp +++ b/src/mongo/db/keys_collection_manager.cpp @@ -44,7 +44,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/concurrency/idle_thread_block.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/time_support.h" diff --git a/src/mongo/db/kill_sessions_common.cpp b/src/mongo/db/kill_sessions_common.cpp index fd31d2f1438..2c6d7612381 100644 --- a/src/mongo/db/kill_sessions_common.cpp +++ b/src/mongo/db/kill_sessions_common.cpp @@ -38,7 +38,6 @@ #include "mongo/db/service_context.h" #include "mongo/db/session_killer.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/kill_sessions_local.cpp b/src/mongo/db/kill_sessions_local.cpp index 91da0862ab0..2da3f3ea5cd 100644 --- a/src/mongo/db/kill_sessions_local.cpp +++ b/src/mongo/db/kill_sessions_local.cpp @@ -41,7 +41,6 @@ #include "mongo/db/session_catalog.h" #include "mongo/db/transaction_participant.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/log_process_details.cpp b/src/mongo/db/log_process_details.cpp index 140f0f51495..0c74fe14106 100644 --- a/src/mongo/db/log_process_details.cpp +++ b/src/mongo/db/log_process_details.cpp @@ -38,7 +38,6 @@ #include "mongo/db/server_options.h" #include "mongo/db/server_options_server_helpers.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/net/socket_utils.h" #include "mongo/util/processinfo.h" #include "mongo/util/version.h" diff --git a/src/mongo/db/logical_clock.cpp b/src/mongo/db/logical_clock.cpp index cb785c29ec5..1a18ce95b6a 100644 --- a/src/mongo/db/logical_clock.cpp +++ b/src/mongo/db/logical_clock.cpp @@ -40,7 +40,6 @@ #include "mongo/db/service_context.h" #include "mongo/db/time_proof_service.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/logical_clock_test.cpp b/src/mongo/db/logical_clock_test.cpp index e6315e33d48..ac739f2a851 100644 --- a/src/mongo/db/logical_clock_test.cpp +++ b/src/mongo/db/logical_clock_test.cpp @@ -43,7 +43,6 @@ #include "mongo/db/repl/replication_coordinator_mock.h" #include "mongo/unittest/unittest.h" #include "mongo/util/clock_source_mock.h" -#include "mongo/util/log.h" 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 dc276ddfa33..5cbe20db8e0 100644 --- a/src/mongo/db/logical_session_cache_factory_mongod.cpp +++ b/src/mongo/db/logical_session_cache_factory_mongod.cpp @@ -42,7 +42,6 @@ #include "mongo/db/sessions_collection_rs.h" #include "mongo/db/sessions_collection_sharded.h" #include "mongo/db/sessions_collection_standalone.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/logical_time_validator.cpp b/src/mongo/db/logical_time_validator.cpp index 0fa0b55cfc5..ecffea541ab 100644 --- a/src/mongo/db/logical_time_validator.cpp +++ b/src/mongo/db/logical_time_validator.cpp @@ -44,7 +44,6 @@ #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/matcher/expression_geo.cpp b/src/mongo/db/matcher/expression_geo.cpp index 68cf0c9d3ef..217f2c936d7 100644 --- a/src/mongo/db/matcher/expression_geo.cpp +++ b/src/mongo/db/matcher/expression_geo.cpp @@ -34,8 +34,8 @@ #include "mongo/bson/simple_bsonobj_comparator.h" #include "mongo/db/geo/geoparser.h" #include "mongo/db/matcher/expression_parser.h" +#include "mongo/logv2/log.h" #include "mongo/platform/basic.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { @@ -79,7 +79,7 @@ Status GeoExpression::parseQuery(const BSONObj& obj) { BSONElement elt = geoIt.next(); if (elt.fieldNameStringData() == "$uniqueDocs") { // Deprecated "$uniqueDocs" field - warning() << "deprecated $uniqueDocs option: " << redact(obj); + LOGV2_WARNING(23847, "deprecated $uniqueDocs option: {obj}", "obj"_attr = redact(obj)); } else { // The element must be a geo specifier. "$box", "$center", "$geometry", etc. geoContainer.reset(new GeometryContainer()); @@ -194,7 +194,7 @@ bool GeoNearExpression::parseLegacyQuery(const BSONObj& obj) { maxDistance = e.Number(); uassert(16896, "$maxDistance must be non-negative", maxDistance >= 0.0); } else if (fieldName == "$uniqueDocs") { - warning() << "ignoring deprecated option $uniqueDocs"; + LOGV2_WARNING(23848, "ignoring deprecated option $uniqueDocs"); } else { // In a query document, $near queries can have no non-geo sibling parameters. uasserted(34413, diff --git a/src/mongo/db/matcher/rewrite_expr.cpp b/src/mongo/db/matcher/rewrite_expr.cpp index 31dfcfd51ee..c8b6c397492 100644 --- a/src/mongo/db/matcher/rewrite_expr.cpp +++ b/src/mongo/db/matcher/rewrite_expr.cpp @@ -37,7 +37,6 @@ #include "mongo/db/matcher/expression_leaf.h" #include "mongo/db/matcher/expression_tree.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/op_observer_impl.cpp b/src/mongo/db/op_observer_impl.cpp index 22f880514e1..30f460db2a7 100644 --- a/src/mongo/db/op_observer_impl.cpp +++ b/src/mongo/db/op_observer_impl.cpp @@ -65,7 +65,6 @@ #include "mongo/scripting/engine.h" #include "mongo/util/assert_util.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { using repl::MutableOplogEntry; diff --git a/src/mongo/db/operation_context.cpp b/src/mongo/db/operation_context.cpp index 1e1858d812b..ee38faab01b 100644 --- a/src/mongo/db/operation_context.cpp +++ b/src/mongo/db/operation_context.cpp @@ -43,7 +43,6 @@ #include "mongo/util/assert_util.h" #include "mongo/util/clock_source.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/system_tick_source.h" diff --git a/src/mongo/db/operation_killer.cpp b/src/mongo/db/operation_killer.cpp index e6546e6c246..971b789e806 100644 --- a/src/mongo/db/operation_killer.cpp +++ b/src/mongo/db/operation_killer.cpp @@ -39,7 +39,6 @@ #include "mongo/db/operation_key_manager.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/ops/parsed_delete.cpp b/src/mongo/db/ops/parsed_delete.cpp index 9e3a4f5250b..cc7039a10b9 100644 --- a/src/mongo/db/ops/parsed_delete.cpp +++ b/src/mongo/db/ops/parsed_delete.cpp @@ -42,7 +42,6 @@ #include "mongo/db/query/get_executor.h" #include "mongo/db/query/query_planner_common.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/ops/update.cpp b/src/mongo/db/ops/update.cpp index e4367d04ac5..00b57ba533c 100644 --- a/src/mongo/db/ops/update.cpp +++ b/src/mongo/db/ops/update.cpp @@ -50,7 +50,6 @@ #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/update/update_driver.h" #include "mongo/db/update_index_data.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/ops/update_result.cpp b/src/mongo/db/ops/update_result.cpp index e5276be908a..55d304adcd2 100644 --- a/src/mongo/db/ops/update_result.cpp +++ b/src/mongo/db/ops/update_result.cpp @@ -36,7 +36,6 @@ #include "mongo/db/lasterror.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/ops/write_ops_exec.cpp b/src/mongo/db/ops/write_ops_exec.cpp index fd5a9c52c55..6a02fde765e 100644 --- a/src/mongo/db/ops/write_ops_exec.cpp +++ b/src/mongo/db/ops/write_ops_exec.cpp @@ -80,7 +80,6 @@ #include "mongo/s/cannot_implicitly_create_collection_info.h" #include "mongo/s/would_change_owning_shard_exception.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/log_and_backoff.h" #include "mongo/util/scopeguard.h" 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 975a225a7fd..e2ddfc6d4fa 100644 --- a/src/mongo/db/periodic_runner_job_abort_expired_transactions.cpp +++ b/src/mongo/db/periodic_runner_job_abort_expired_transactions.cpp @@ -39,7 +39,6 @@ #include "mongo/db/transaction_participant.h" #include "mongo/db/transaction_participant_gen.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/periodic_runner.h" namespace mongo { diff --git a/src/mongo/db/periodic_runner_job_decrease_snapshot_cache_pressure.cpp b/src/mongo/db/periodic_runner_job_decrease_snapshot_cache_pressure.cpp index 5d99a62f91b..692e2db1d7b 100644 --- a/src/mongo/db/periodic_runner_job_decrease_snapshot_cache_pressure.cpp +++ b/src/mongo/db/periodic_runner_job_decrease_snapshot_cache_pressure.cpp @@ -39,7 +39,6 @@ #include "mongo/db/snapshot_window_options.h" #include "mongo/db/snapshot_window_util.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/periodic_runner.h" namespace mongo { diff --git a/src/mongo/db/pipeline/document_source_change_stream.cpp b/src/mongo/db/pipeline/document_source_change_stream.cpp index f7b3be9d73d..c72dc752d81 100644 --- a/src/mongo/db/pipeline/document_source_change_stream.cpp +++ b/src/mongo/db/pipeline/document_source_change_stream.cpp @@ -54,7 +54,6 @@ #include "mongo/db/repl/replication_coordinator.h" #include "mongo/s/catalog_cache.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { 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 bb8447b1137..45622c9cf9e 100644 --- a/src/mongo/db/pipeline/document_source_change_stream_transform.cpp +++ b/src/mongo/db/pipeline/document_source_change_stream_transform.cpp @@ -56,7 +56,6 @@ #include "mongo/db/transaction_history_iterator.h" #include "mongo/s/catalog_cache.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/pipeline/document_source_check_invalidate.cpp b/src/mongo/db/pipeline/document_source_check_invalidate.cpp index 330ef4d02df..9da06f4bd17 100644 --- a/src/mongo/db/pipeline/document_source_check_invalidate.cpp +++ b/src/mongo/db/pipeline/document_source_check_invalidate.cpp @@ -33,7 +33,6 @@ #include "mongo/db/pipeline/document_source_change_stream.h" #include "mongo/db/pipeline/document_source_check_invalidate.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/pipeline/document_source_cursor.cpp b/src/mongo/db/pipeline/document_source_cursor.cpp index 282b9dbec3f..7b211bd4c52 100644 --- a/src/mongo/db/pipeline/document_source_cursor.cpp +++ b/src/mongo/db/pipeline/document_source_cursor.cpp @@ -42,7 +42,6 @@ #include "mongo/db/storage/storage_options.h" #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/pipeline/document_source_exchange.cpp b/src/mongo/db/pipeline/document_source_exchange.cpp index 8c7b990ba78..27fe55ac664 100644 --- a/src/mongo/db/pipeline/document_source_exchange.cpp +++ b/src/mongo/db/pipeline/document_source_exchange.cpp @@ -40,7 +40,6 @@ #include "mongo/db/pipeline/document_source_exchange.h" #include "mongo/db/storage/key_string.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/pipeline/document_source_exchange_test.cpp b/src/mongo/db/pipeline/document_source_exchange_test.cpp index 8639cfd45a6..dadea2baa54 100644 --- a/src/mongo/db/pipeline/document_source_exchange_test.cpp +++ b/src/mongo/db/pipeline/document_source_exchange_test.cpp @@ -44,7 +44,6 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/clock_source_mock.h" #include "mongo/util/concurrency/thread_pool.h" -#include "mongo/util/log.h" #include "mongo/util/system_clock_source.h" #include "mongo/util/time_support.h" diff --git a/src/mongo/db/pipeline/document_source_geo_near.cpp b/src/mongo/db/pipeline/document_source_geo_near.cpp index 9726ad37caf..37817cdbf29 100644 --- a/src/mongo/db/pipeline/document_source_geo_near.cpp +++ b/src/mongo/db/pipeline/document_source_geo_near.cpp @@ -37,7 +37,6 @@ #include "mongo/db/pipeline/document_source_sort.h" #include "mongo/db/pipeline/lite_parsed_document_source.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { 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 bd555f94a80..cb10a68d1c1 100644 --- a/src/mongo/db/pipeline/document_source_internal_shard_filter.cpp +++ b/src/mongo/db/pipeline/document_source_internal_shard_filter.cpp @@ -34,7 +34,8 @@ #include "mongo/db/pipeline/document_source_internal_shard_filter.h" #include "mongo/db/exec/document_value/document.h" -#include "mongo/util/log.h" +#include "mongo/logger/redaction.h" +#include "mongo/logv2/log.h" namespace mongo { @@ -58,10 +59,12 @@ DocumentSource::GetNextResult DocumentSourceInternalShardFilter::doGetNext() { } if (belongsRes == ShardFilterer::DocumentBelongsResult::kNoShardKey) { - warning() << "no shard key found in document " << redact(next.getDocument().toBson()) - << " " - << "for shard key pattern " << _shardFilterer->getKeyPattern() << ", " - << "document may have been inserted manually into shard"; + LOGV2_WARNING(23870, + "no shard key found in document {next_getDocument_toBson} for shard key " + "pattern {shardFilterer_getKeyPattern}, document may have been inserted " + "manually into shard", + "next_getDocument_toBson"_attr = redact(next.getDocument().toBson()), + "shardFilterer_getKeyPattern"_attr = _shardFilterer->getKeyPattern()); } // For performance reasons, a streaming stage must not keep references to documents across diff --git a/src/mongo/db/pipeline/document_source_lookup_change_pre_image.cpp b/src/mongo/db/pipeline/document_source_lookup_change_pre_image.cpp index af670df9961..d9c5077a109 100644 --- a/src/mongo/db/pipeline/document_source_lookup_change_pre_image.cpp +++ b/src/mongo/db/pipeline/document_source_lookup_change_pre_image.cpp @@ -37,7 +37,6 @@ #include "mongo/db/repl/local_oplog_info.h" #include "mongo/db/transaction_history_iterator.h" #include "mongo/util/intrusive_counter.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/pipeline/document_source_match_test.cpp b/src/mongo/db/pipeline/document_source_match_test.cpp index 9873ba1c55b..264e055b64e 100644 --- a/src/mongo/db/pipeline/document_source_match_test.cpp +++ b/src/mongo/db/pipeline/document_source_match_test.cpp @@ -45,7 +45,6 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/death_test.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/pipeline/document_source_merge.cpp b/src/mongo/db/pipeline/document_source_merge.cpp index fbcb54950b8..eeebe917c82 100644 --- a/src/mongo/db/pipeline/document_source_merge.cpp +++ b/src/mongo/db/pipeline/document_source_merge.cpp @@ -41,7 +41,6 @@ #include "mongo/db/ops/write_ops.h" #include "mongo/db/pipeline/document_path_support.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" 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 3cde388224b..f5d2388cae3 100644 --- a/src/mongo/db/pipeline/document_source_out.cpp +++ b/src/mongo/db/pipeline/document_source_out.cpp @@ -43,7 +43,6 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/util/destructor_guard.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/uuid.h" namespace mongo { 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 64ca6cdf86b..70a8ece3337 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 @@ -41,7 +41,6 @@ #include "mongo/db/pipeline/expression.h" #include "mongo/db/pipeline/expression_context.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { using boost::intrusive_ptr; diff --git a/src/mongo/db/pipeline/document_source_union_with.cpp b/src/mongo/db/pipeline/document_source_union_with.cpp index 1885bef0b51..ad9b7acc9d0 100644 --- a/src/mongo/db/pipeline/document_source_union_with.cpp +++ b/src/mongo/db/pipeline/document_source_union_with.cpp @@ -37,7 +37,7 @@ #include "mongo/db/pipeline/document_source_single_document_transformation.h" #include "mongo/db/pipeline/document_source_union_with.h" #include "mongo/db/pipeline/document_source_union_with_gen.h" -#include "mongo/util/log.h" +#include "mongo/logv2/log.h" namespace mongo { @@ -172,7 +172,7 @@ DocumentSource::GetNextResult DocumentSourceUnionWith::doGetNext() { _pipeline = pExpCtx->mongoProcessInterface->attachCursorSourceToPipeline(ctx, _pipeline.release()); _cursorAttached = true; - LOG(3) << "$unionWith attached cursor to pipeline"; + LOGV2_DEBUG(23869, 3, "$unionWith attached cursor to pipeline"); } if (auto res = _pipeline->getNext()) diff --git a/src/mongo/db/pipeline/pipeline_d.cpp b/src/mongo/db/pipeline/pipeline_d.cpp index a0bddbaea78..f4545935c4e 100644 --- a/src/mongo/db/pipeline/pipeline_d.cpp +++ b/src/mongo/db/pipeline/pipeline_d.cpp @@ -87,7 +87,6 @@ #include "mongo/s/grid.h" #include "mongo/s/query/document_source_merge_cursors.h" #include "mongo/s/write_ops/cluster_write.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { 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 eaf5fcef8c1..3d1014ccb74 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 @@ -66,9 +66,9 @@ #include "mongo/db/storage/durable_catalog.h" #include "mongo/db/transaction_history_iterator.h" #include "mongo/db/transaction_participant.h" +#include "mongo/logv2/log.h" #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/query/document_source_merge_cursors.h" -#include "mongo/util/log.h" namespace mongo { @@ -161,7 +161,10 @@ std::vector CommonMongodProcessInterface::getIndexStats(OperationConte Collection* collection = autoColl.getCollection(); std::vector indexStats; if (!collection) { - LOG(2) << "Collection not found on index stats retrieval: " << ns.ns(); + LOGV2_DEBUG(23881, + 2, + "Collection not found on index stats retrieval: {ns_ns}", + "ns_ns"_attr = ns.ns()); return indexStats; } 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 a0e1057e033..14c48822f13 100644 --- a/src/mongo/db/pipeline/process_interface/common_process_interface.cpp +++ b/src/mongo/db/pipeline/process_interface/common_process_interface.cpp @@ -46,7 +46,6 @@ #include "mongo/s/catalog_cache.h" #include "mongo/s/grid.h" #include "mongo/util/diagnostic_info.h" -#include "mongo/util/log.h" #include "mongo/util/net/socket_utils.h" namespace mongo { 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 087a258a3fa..9711247a12b 100644 --- a/src/mongo/db/pipeline/process_interface/shardsvr_process_interface.cpp +++ b/src/mongo/db/pipeline/process_interface/shardsvr_process_interface.cpp @@ -49,7 +49,6 @@ #include "mongo/s/grid.h" #include "mongo/s/query/document_source_merge_cursors.h" #include "mongo/s/write_ops/cluster_write.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/pipeline/resume_token_test.cpp b/src/mongo/db/pipeline/resume_token_test.cpp index fdb83f3700a..0fb4ef874b1 100644 --- a/src/mongo/db/pipeline/resume_token_test.cpp +++ b/src/mongo/db/pipeline/resume_token_test.cpp @@ -39,7 +39,6 @@ #include "mongo/db/pipeline/document_source_change_stream.h" #include "mongo/unittest/unittest.h" #include "mongo/util/hex.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/pipeline/sharded_agg_helpers.cpp b/src/mongo/db/pipeline/sharded_agg_helpers.cpp index 291b477341e..b68ad0edc34 100644 --- a/src/mongo/db/pipeline/sharded_agg_helpers.cpp +++ b/src/mongo/db/pipeline/sharded_agg_helpers.cpp @@ -58,7 +58,6 @@ #include "mongo/s/query/establish_cursors.h" #include "mongo/s/transaction_router.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo::sharded_agg_helpers { diff --git a/src/mongo/db/query/canonical_query.cpp b/src/mongo/db/query/canonical_query.cpp index a3d04ae167b..d47f23b848f 100644 --- a/src/mongo/db/query/canonical_query.cpp +++ b/src/mongo/db/query/canonical_query.cpp @@ -42,7 +42,6 @@ #include "mongo/db/query/indexability.h" #include "mongo/db/query/projection_parser.h" #include "mongo/db/query/query_planner_common.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/query/canonical_query_encoder.cpp b/src/mongo/db/query/canonical_query_encoder.cpp index 101787c5bf1..ab3ad6d7468 100644 --- a/src/mongo/db/query/canonical_query_encoder.cpp +++ b/src/mongo/db/query/canonical_query_encoder.cpp @@ -39,7 +39,7 @@ #include "mongo/db/matcher/expression_array.h" #include "mongo/db/matcher/expression_geo.h" #include "mongo/db/query/projection.h" -#include "mongo/util/log.h" +#include "mongo/logv2/log.h" namespace mongo { namespace { @@ -268,8 +268,13 @@ void encodeGeoMatchExpression(const GeoMatchExpression* tree, StringBuilder* key } else if (STRICT_SPHERE == geoQuery.getGeometry().getNativeCRS()) { *keyBuilder << "ss"; } else { - error() << "unknown CRS type " << (int)geoQuery.getGeometry().getNativeCRS() - << " in geometry of type " << geoQuery.getGeometry().getDebugType(); + LOGV2_ERROR(23849, + "unknown CRS type {int_geoQuery_getGeometry_getNativeCRS} in geometry of type " + "{geoQuery_getGeometry_getDebugType}", + "int_geoQuery_getGeometry_getNativeCRS"_attr = + (int)geoQuery.getGeometry().getNativeCRS(), + "geoQuery_getGeometry_getDebugType"_attr = + geoQuery.getGeometry().getDebugType()); MONGO_UNREACHABLE; } } @@ -298,8 +303,10 @@ void encodeGeoNearMatchExpression(const GeoNearMatchExpression* tree, StringBuil *keyBuilder << "ss"; break; case UNSET: - error() << "unknown CRS type " << (int)nearQuery.centroid->crs - << " in point geometry for near query"; + LOGV2_ERROR( + 23850, + "unknown CRS type {int_nearQuery_centroid_crs} in point geometry for near query", + "int_nearQuery_centroid_crs"_attr = (int)nearQuery.centroid->crs); MONGO_UNREACHABLE; break; } diff --git a/src/mongo/db/query/collection_query_info.cpp b/src/mongo/db/query/collection_query_info.cpp index 2ff45ae8fe5..66c175ae534 100644 --- a/src/mongo/db/query/collection_query_info.cpp +++ b/src/mongo/db/query/collection_query_info.cpp @@ -50,7 +50,6 @@ #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" #include "mongo/util/clock_source.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/query/datetime/date_time_support.cpp b/src/mongo/db/query/datetime/date_time_support.cpp index f98dcfac779..a70e21c26a0 100644 --- a/src/mongo/db/query/datetime/date_time_support.cpp +++ b/src/mongo/db/query/datetime/date_time_support.cpp @@ -41,7 +41,6 @@ #include "mongo/db/service_context.h" #include "mongo/util/assert_util.h" #include "mongo/util/duration.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/query/find.cpp b/src/mongo/db/query/find.cpp index ffbae30a9ee..90a910aab06 100644 --- a/src/mongo/db/query/find.cpp +++ b/src/mongo/db/query/find.cpp @@ -67,7 +67,6 @@ #include "mongo/s/chunk_version.h" #include "mongo/s/stale_exception.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/query/find_common.cpp b/src/mongo/db/query/find_common.cpp index 78568ac6153..864151423fa 100644 --- a/src/mongo/db/query/find_common.cpp +++ b/src/mongo/db/query/find_common.cpp @@ -40,7 +40,6 @@ #include "mongo/db/query/query_request.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/query/get_executor.cpp b/src/mongo/db/query/get_executor.cpp index 4738f0fa6be..4de4d1d5288 100644 --- a/src/mongo/db/query/get_executor.cpp +++ b/src/mongo/db/query/get_executor.cpp @@ -89,7 +89,6 @@ #include "mongo/db/storage/storage_options.h" #include "mongo/logv2/log.h" #include "mongo/scripting/engine.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/query/index_bounds_builder.cpp b/src/mongo/db/query/index_bounds_builder.cpp index 9bb746228e1..3c4e9da2948 100644 --- a/src/mongo/db/query/index_bounds_builder.cpp +++ b/src/mongo/db/query/index_bounds_builder.cpp @@ -51,7 +51,6 @@ #include "mongo/db/query/planner_wildcard_helpers.h" #include "mongo/db/query/query_knobs_gen.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "third_party/s2/s2cell.h" #include "third_party/s2/s2regioncoverer.h" diff --git a/src/mongo/db/query/plan_cache.cpp b/src/mongo/db/query/plan_cache.cpp index 5e25131d41f..1231efecab0 100644 --- a/src/mongo/db/query/plan_cache.cpp +++ b/src/mongo/db/query/plan_cache.cpp @@ -54,7 +54,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" #include "mongo/util/hex.h" -#include "mongo/util/log.h" #include "mongo/util/transitional_tools_do_not_use/vector_spooling.h" namespace mongo { diff --git a/src/mongo/db/query/plan_enumerator.cpp b/src/mongo/db/query/plan_enumerator.cpp index 733b17056eb..87535d59bd5 100644 --- a/src/mongo/db/query/plan_enumerator.cpp +++ b/src/mongo/db/query/plan_enumerator.cpp @@ -36,7 +36,6 @@ #include "mongo/db/query/index_tag.h" #include "mongo/db/query/indexability.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/string_map.h" namespace { diff --git a/src/mongo/db/query/plan_executor_impl.cpp b/src/mongo/db/query/plan_executor_impl.cpp index fae86c1e8ce..7bb6e5ad71b 100644 --- a/src/mongo/db/query/plan_executor_impl.cpp +++ b/src/mongo/db/query/plan_executor_impl.cpp @@ -58,7 +58,6 @@ #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/stacktrace.h" diff --git a/src/mongo/db/query/plan_ranker.cpp b/src/mongo/db/query/plan_ranker.cpp index 2c5abd7cad6..c3c4e70b25b 100644 --- a/src/mongo/db/query/plan_ranker.cpp +++ b/src/mongo/db/query/plan_ranker.cpp @@ -45,7 +45,6 @@ #include "mongo/db/query/query_solution.h" #include "mongo/db/server_options.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace { diff --git a/src/mongo/db/query/planner_access.cpp b/src/mongo/db/query/planner_access.cpp index 9510cc85481..e34f0ddf8ac 100644 --- a/src/mongo/db/query/planner_access.cpp +++ b/src/mongo/db/query/planner_access.cpp @@ -51,7 +51,6 @@ #include "mongo/db/query/query_planner.h" #include "mongo/db/query/query_planner_common.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/transitional_tools_do_not_use/vector_spooling.h" namespace { diff --git a/src/mongo/db/query/planner_analysis.cpp b/src/mongo/db/query/planner_analysis.cpp index 942d27d7512..7ef87e726a1 100644 --- a/src/mongo/db/query/planner_analysis.cpp +++ b/src/mongo/db/query/planner_analysis.cpp @@ -43,7 +43,6 @@ #include "mongo/db/query/query_planner.h" #include "mongo/db/query/query_planner_common.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/query/planner_ixselect.cpp b/src/mongo/db/query/planner_ixselect.cpp index 27ad04ac703..2ce90a47a49 100644 --- a/src/mongo/db/query/planner_ixselect.cpp +++ b/src/mongo/db/query/planner_ixselect.cpp @@ -48,7 +48,6 @@ #include "mongo/db/query/planner_wildcard_helpers.h" #include "mongo/db/query/query_planner_common.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/query/planner_wildcard_helpers.cpp b/src/mongo/db/query/planner_wildcard_helpers.cpp index c04c33e02d0..c65c5ae28ec 100644 --- a/src/mongo/db/query/planner_wildcard_helpers.cpp +++ b/src/mongo/db/query/planner_wildcard_helpers.cpp @@ -40,7 +40,6 @@ #include "mongo/db/index/wildcard_key_generator.h" #include "mongo/db/query/index_bounds.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace wildcard_planning { diff --git a/src/mongo/db/query/query_planner.cpp b/src/mongo/db/query/query_planner.cpp index 966fb61275e..48d8f49b519 100644 --- a/src/mongo/db/query/query_planner.cpp +++ b/src/mongo/db/query/query_planner.cpp @@ -55,7 +55,6 @@ #include "mongo/db/query/query_planner_common.h" #include "mongo/db/query/query_solution.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/query/query_planner_common.cpp b/src/mongo/db/query/query_planner_common.cpp index 98c9b00f88f..34c62f1b1d0 100644 --- a/src/mongo/db/query/query_planner_common.cpp +++ b/src/mongo/db/query/query_planner_common.cpp @@ -35,8 +35,9 @@ #include "mongo/db/query/projection_ast_path_tracking_visitor.h" #include "mongo/db/query/projection_ast_walker.h" #include "mongo/db/query/query_planner_common.h" +#include "mongo/logger/redaction.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" + namespace mongo { diff --git a/src/mongo/db/query/query_planner_test_fixture.cpp b/src/mongo/db/query/query_planner_test_fixture.cpp index c7c9bd342c6..0ea76a16783 100644 --- a/src/mongo/db/query/query_planner_test_fixture.cpp +++ b/src/mongo/db/query/query_planner_test_fixture.cpp @@ -43,7 +43,6 @@ #include "mongo/db/query/query_planner.h" #include "mongo/db/query/query_planner_test_lib.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/transitional_tools_do_not_use/vector_spooling.h" namespace mongo { diff --git a/src/mongo/db/query/query_planner_test_lib.cpp b/src/mongo/db/query/query_planner_test_lib.cpp index 4643d3c1516..dc1ee631607 100644 --- a/src/mongo/db/query/query_planner_test_lib.cpp +++ b/src/mongo/db/query/query_planner_test_lib.cpp @@ -47,9 +47,9 @@ #include "mongo/db/query/projection_parser.h" #include "mongo/db/query/query_planner.h" #include "mongo/db/query/query_solution.h" +#include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace { @@ -138,7 +138,9 @@ bool bsonObjFieldsAreInSet(BSONObj obj, const std::set& allowedFiel while (i.more()) { BSONElement child = i.next(); if (!allowedFields.count(child.fieldName())) { - error() << "Did not expect to find " << child.fieldName(); + LOGV2_ERROR(23932, + "Did not expect to find {child_fieldName}", + "child_fieldName"_attr = child.fieldName()); return false; } } diff --git a/src/mongo/db/read_concern_mongod.cpp b/src/mongo/db/read_concern_mongod.cpp index 2af9934eff4..54588856e58 100644 --- a/src/mongo/db/read_concern_mongod.cpp +++ b/src/mongo/db/read_concern_mongod.cpp @@ -48,7 +48,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/grid.h" #include "mongo/util/concurrency/notification.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/read_concern_test.cpp b/src/mongo/db/read_concern_test.cpp index 50ff8761aeb..efefdcf59ec 100644 --- a/src/mongo/db/read_concern_test.cpp +++ b/src/mongo/db/read_concern_test.cpp @@ -37,7 +37,6 @@ #include "mongo/db/repl/replication_coordinator_test_fixture.h" #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { namespace repl { diff --git a/src/mongo/db/read_write_concern_defaults.cpp b/src/mongo/db/read_write_concern_defaults.cpp index 4460159502e..65cabd5e5eb 100644 --- a/src/mongo/db/read_write_concern_defaults.cpp +++ b/src/mongo/db/read_write_concern_defaults.cpp @@ -35,7 +35,6 @@ #include "mongo/db/logical_clock.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/repair_database.cpp b/src/mongo/db/repair_database.cpp index 9a2b52d9967..dcb7bb8b31f 100644 --- a/src/mongo/db/repair_database.cpp +++ b/src/mongo/db/repair_database.cpp @@ -62,7 +62,6 @@ #include "mongo/db/storage/storage_engine.h" #include "mongo/db/storage/storage_repair_observer.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/repair_database_and_check_version.cpp b/src/mongo/db/repair_database_and_check_version.cpp index bbc6cd8f75d..66437a78b4f 100644 --- a/src/mongo/db/repair_database_and_check_version.cpp +++ b/src/mongo/db/repair_database_and_check_version.cpp @@ -60,7 +60,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/exit.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/quick_exit.h" #if !defined(_WIN32) diff --git a/src/mongo/db/repl/all_database_cloner.cpp b/src/mongo/db/repl/all_database_cloner.cpp index ca47cac6aef..da25493374b 100644 --- a/src/mongo/db/repl/all_database_cloner.cpp +++ b/src/mongo/db/repl/all_database_cloner.cpp @@ -37,7 +37,6 @@ #include "mongo/db/repl/all_database_cloner.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" 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 bbbc8a66c67..10507e1bb85 100644 --- a/src/mongo/db/repl/all_database_cloner_test.cpp +++ b/src/mongo/db/repl/all_database_cloner_test.cpp @@ -41,7 +41,6 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/clock_source_mock.h" #include "mongo/util/concurrency/thread_pool.h" -#include "mongo/util/log.h" namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/apply_ops.cpp b/src/mongo/db/repl/apply_ops.cpp index 8f5be92b221..96582c70720 100644 --- a/src/mongo/db/repl/apply_ops.cpp +++ b/src/mongo/db/repl/apply_ops.cpp @@ -58,7 +58,6 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/base_cloner.cpp b/src/mongo/db/repl/base_cloner.cpp index 0fd80028486..cbad2e60b11 100644 --- a/src/mongo/db/repl/base_cloner.cpp +++ b/src/mongo/db/repl/base_cloner.cpp @@ -33,7 +33,6 @@ #include "mongo/db/repl/base_cloner.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/repl/bgsync.cpp b/src/mongo/db/repl/bgsync.cpp index d1c6d22120f..fd1bd90f603 100644 --- a/src/mongo/db/repl/bgsync.cpp +++ b/src/mongo/db/repl/bgsync.cpp @@ -61,7 +61,6 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/rpc/metadata/repl_set_metadata.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/time_support.h" 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 01f4e6c5e55..82bca3a8803 100644 --- a/src/mongo/db/repl/check_quorum_for_config_change.cpp +++ b/src/mongo/db/repl/check_quorum_for_config_change.cpp @@ -42,7 +42,6 @@ #include "mongo/db/server_options.h" #include "mongo/logv2/log.h" #include "mongo/rpc/metadata/repl_set_metadata.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/repl/collection_bulk_loader_impl.cpp b/src/mongo/db/repl/collection_bulk_loader_impl.cpp index 08393acd715..d6cbe4874f4 100644 --- a/src/mongo/db/repl/collection_bulk_loader_impl.cpp +++ b/src/mongo/db/repl/collection_bulk_loader_impl.cpp @@ -47,7 +47,6 @@ #include "mongo/db/repl/repl_server_parameters_gen.h" #include "mongo/logv2/log.h" #include "mongo/util/destructor_guard.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/repl/collection_cloner.cpp b/src/mongo/db/repl/collection_cloner.cpp index 55bc1ccce09..26ff83f2e2c 100644 --- a/src/mongo/db/repl/collection_cloner.cpp +++ b/src/mongo/db/repl/collection_cloner.cpp @@ -41,7 +41,6 @@ #include "mongo/db/wire_version.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" 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 bed866625c6..0cd255a64db 100644 --- a/src/mongo/db/repl/data_replicator_external_state_impl.cpp +++ b/src/mongo/db/repl/data_replicator_external_state_impl.cpp @@ -44,7 +44,6 @@ #include "mongo/db/repl/replication_process.h" #include "mongo/db/repl/storage_interface.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/database_cloner.cpp b/src/mongo/db/repl/database_cloner.cpp index 5dbabe1cb92..67ce43a577b 100644 --- a/src/mongo/db/repl/database_cloner.cpp +++ b/src/mongo/db/repl/database_cloner.cpp @@ -37,7 +37,6 @@ #include "mongo/db/repl/database_cloner_gen.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" 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 cf3e1e54843..ea837191ef5 100644 --- a/src/mongo/db/repl/drop_pending_collection_reaper.cpp +++ b/src/mongo/db/repl/drop_pending_collection_reaper.cpp @@ -41,7 +41,6 @@ #include "mongo/db/repl/storage_interface.h" #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/idempotency_test.cpp b/src/mongo/db/repl/idempotency_test.cpp index 89b3a37de5b..9a8c14fba32 100644 --- a/src/mongo/db/repl/idempotency_test.cpp +++ b/src/mongo/db/repl/idempotency_test.cpp @@ -44,7 +44,6 @@ #include "mongo/db/server_options.h" #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/initial_syncer.cpp b/src/mongo/db/repl/initial_syncer.cpp index a2aa7ec87a3..ce74b1ae19a 100644 --- a/src/mongo/db/repl/initial_syncer.cpp +++ b/src/mongo/db/repl/initial_syncer.cpp @@ -68,7 +68,6 @@ #include "mongo/util/assert_util.h" #include "mongo/util/destructor_guard.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" #include "mongo/util/system_clock_source.h" diff --git a/src/mongo/db/repl/insert_group.cpp b/src/mongo/db/repl/insert_group.cpp index 931ca0d3367..1324332107e 100644 --- a/src/mongo/db/repl/insert_group.cpp +++ b/src/mongo/db/repl/insert_group.cpp @@ -42,7 +42,6 @@ #include "mongo/db/repl/oplog_entry.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/member_data.cpp b/src/mongo/db/repl/member_data.cpp index 56cc13619e3..cca0de66edb 100644 --- a/src/mongo/db/repl/member_data.cpp +++ b/src/mongo/db/repl/member_data.cpp @@ -36,7 +36,6 @@ #include "mongo/db/repl/member_data.h" #include "mongo/db/repl/rslog.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/noop_writer.cpp b/src/mongo/db/repl/noop_writer.cpp index 67fba097925..943e7299051 100644 --- a/src/mongo/db/repl/noop_writer.cpp +++ b/src/mongo/db/repl/noop_writer.cpp @@ -45,7 +45,6 @@ #include "mongo/db/repl/repl_server_parameters_gen.h" #include "mongo/logv2/log.h" #include "mongo/util/concurrency/idle_thread_block.h" -#include "mongo/util/log.h" namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp index d2d92c32693..2a554a20ef1 100644 --- a/src/mongo/db/repl/oplog.cpp +++ b/src/mongo/db/repl/oplog.cpp @@ -98,7 +98,6 @@ #include "mongo/util/elapsed_tracker.h" #include "mongo/util/fail_point.h" #include "mongo/util/file.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/repl/oplog_applier.cpp b/src/mongo/db/repl/oplog_applier.cpp index 294930161ec..2e01bc28acb 100644 --- a/src/mongo/db/repl/oplog_applier.cpp +++ b/src/mongo/db/repl/oplog_applier.cpp @@ -37,7 +37,6 @@ #include "mongo/db/namespace_string.h" #include "mongo/db/repl/repl_server_parameters_gen.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/db/repl/oplog_batcher.cpp b/src/mongo/db/repl/oplog_batcher.cpp index 3d2348ad8a1..a36c8b77b4d 100644 --- a/src/mongo/db/repl/oplog_batcher.cpp +++ b/src/mongo/db/repl/oplog_batcher.cpp @@ -36,7 +36,6 @@ #include "mongo/db/repl/oplog_applier.h" #include "mongo/db/repl/repl_server_parameters_gen.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/oplog_buffer_collection.cpp b/src/mongo/db/repl/oplog_buffer_collection.cpp index 69e25926631..018f7154a5e 100644 --- a/src/mongo/db/repl/oplog_buffer_collection.cpp +++ b/src/mongo/db/repl/oplog_buffer_collection.cpp @@ -42,7 +42,6 @@ #include "mongo/db/catalog/collection_options.h" #include "mongo/db/repl/storage_interface.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/oplog_entry.cpp b/src/mongo/db/repl/oplog_entry.cpp index 6043e510885..0412f6b2362 100644 --- a/src/mongo/db/repl/oplog_entry.cpp +++ b/src/mongo/db/repl/oplog_entry.cpp @@ -35,7 +35,7 @@ #include "mongo/db/index/index_descriptor.h" #include "mongo/db/namespace_string.h" -#include "mongo/util/log.h" +#include "mongo/logger/redaction.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/db/repl/oplog_fetcher.cpp b/src/mongo/db/repl/oplog_fetcher.cpp index e02922be165..6ed2ac7f1a7 100644 --- a/src/mongo/db/repl/oplog_fetcher.cpp +++ b/src/mongo/db/repl/oplog_fetcher.cpp @@ -45,7 +45,6 @@ #include "mongo/rpc/metadata/oplog_query_metadata.h" #include "mongo/util/assert_util.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/db/repl/oplog_fetcher_mock.cpp b/src/mongo/db/repl/oplog_fetcher_mock.cpp index f375b6c6eb0..5c9404d7ff0 100644 --- a/src/mongo/db/repl/oplog_fetcher_mock.cpp +++ b/src/mongo/db/repl/oplog_fetcher_mock.cpp @@ -33,7 +33,6 @@ #include -#include "mongo/util/log.h" namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/repl_client_info.cpp b/src/mongo/db/repl/repl_client_info.cpp index 119ec569a65..d7c222c9b12 100644 --- a/src/mongo/db/repl/repl_client_info.cpp +++ b/src/mongo/db/repl/repl_client_info.cpp @@ -38,7 +38,6 @@ #include "mongo/db/repl/replication_coordinator.h" #include "mongo/logv2/log.h" #include "mongo/util/decorable.h" -#include "mongo/util/log.h" 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 5905881ac3d..5c547211d03 100644 --- a/src/mongo/db/repl/repl_set_heartbeat_response.cpp +++ b/src/mongo/db/repl/repl_set_heartbeat_response.cpp @@ -42,7 +42,6 @@ #include "mongo/db/server_options.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/repl/repl_settings.cpp b/src/mongo/db/repl/repl_settings.cpp index f8abdd02cf8..62d75b8f328 100644 --- a/src/mongo/db/repl/repl_settings.cpp +++ b/src/mongo/db/repl/repl_settings.cpp @@ -35,7 +35,6 @@ #include "mongo/db/repl/repl_server_parameters_gen.h" #include "mongo/db/repl/repl_settings_gen.h" -#include "mongo/util/log.h" namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/replication_consistency_markers_impl.cpp b/src/mongo/db/repl/replication_consistency_markers_impl.cpp index 6464b0311cc..c0a4cbba3e9 100644 --- a/src/mongo/db/repl/replication_consistency_markers_impl.cpp +++ b/src/mongo/db/repl/replication_consistency_markers_impl.cpp @@ -40,7 +40,6 @@ #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/repl/storage_interface.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" 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 0a0de0577e8..239d49fb092 100644 --- a/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.cpp @@ -108,7 +108,6 @@ #include "mongo/util/concurrency/thread_pool.h" #include "mongo/util/exit.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" 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 4f9e195937a..e2b0ee9ecfd 100644 --- a/src/mongo/db/repl/replication_coordinator_external_state_mock.cpp +++ b/src/mongo/db/repl/replication_coordinator_external_state_mock.cpp @@ -40,7 +40,6 @@ #include "mongo/db/client.h" #include "mongo/db/jsobj.h" #include "mongo/db/repl/oplog_buffer_blocking_queue.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/sequence_util.h" diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp index 57fdf4b11ab..5685e7955f2 100644 --- a/src/mongo/db/repl/replication_coordinator_impl.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl.cpp @@ -95,7 +95,6 @@ #include "mongo/rpc/metadata/repl_set_metadata.h" #include "mongo/util/assert_util.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/stacktrace.h" #include "mongo/util/time_support.h" 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 ef7cc5ec2b1..f24168e51dd 100644 --- a/src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp +++ b/src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp @@ -39,7 +39,6 @@ #include "mongo/db/repl/vote_requester.h" #include "mongo/logv2/log.h" #include "mongo/platform/mutex.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/repl/replication_info.cpp b/src/mongo/db/repl/replication_info.cpp index 6d65ffb2bd4..d5c183c365f 100644 --- a/src/mongo/db/repl/replication_info.cpp +++ b/src/mongo/db/repl/replication_info.cpp @@ -60,11 +60,11 @@ #include "mongo/db/storage/storage_options.h" #include "mongo/db/wire_version.h" #include "mongo/executor/network_interface.h" +#include "mongo/logv2/log.h" #include "mongo/rpc/metadata/client_metadata.h" #include "mongo/rpc/metadata/client_metadata_ismaster.h" #include "mongo/util/decimal_counter.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/map_util.h" namespace mongo { @@ -438,7 +438,7 @@ public: uassert(31373, "maxAwaitTimeMS must be a non-negative integer", *maxAwaitTimeMS >= 0); - LOG(3) << "Using maxAwaitTimeMS for awaitable isMaster protocol."; + LOGV2_DEBUG(23904, 3, "Using maxAwaitTimeMS for awaitable isMaster protocol."); } else { uassert(31368, (topologyVersionElement @@ -492,7 +492,7 @@ public: saslMechanismRegistry.advertiseMechanismNamesForUser(opCtx, cmdObj, &result); if (opCtx->isExhaust()) { - LOG(3) << "Using exhaust for isMaster protocol"; + LOGV2_DEBUG(23905, 3, "Using exhaust for isMaster protocol"); uassert(51756, "An isMaster request with exhaust must specify 'maxAwaitTimeMS'", diff --git a/src/mongo/db/repl/replication_process.cpp b/src/mongo/db/repl/replication_process.cpp index 194c0194d12..beb706bc49d 100644 --- a/src/mongo/db/repl/replication_process.cpp +++ b/src/mongo/db/repl/replication_process.cpp @@ -43,7 +43,6 @@ #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/repl/replication_recovery_test.cpp b/src/mongo/db/repl/replication_recovery_test.cpp index a9a63d41eac..b14b911d973 100644 --- a/src/mongo/db/repl/replication_recovery_test.cpp +++ b/src/mongo/db/repl/replication_recovery_test.cpp @@ -56,7 +56,6 @@ #include "mongo/unittest/death_test.h" #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace { diff --git a/src/mongo/db/repl/reporter.cpp b/src/mongo/db/repl/reporter.cpp index 2d23ef4e256..8b63bfbaad4 100644 --- a/src/mongo/db/repl/reporter.cpp +++ b/src/mongo/db/repl/reporter.cpp @@ -41,7 +41,6 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/util/assert_util.h" #include "mongo/util/destructor_guard.h" -#include "mongo/util/log.h" 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 04ea36b725d..c2724d687bd 100644 --- a/src/mongo/db/repl/roll_back_local_operations.cpp +++ b/src/mongo/db/repl/roll_back_local_operations.cpp @@ -35,7 +35,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { 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 659ac806d09..f51e5404d4b 100644 --- a/src/mongo/db/repl/roll_back_local_operations_test.cpp +++ b/src/mongo/db/repl/roll_back_local_operations_test.cpp @@ -43,7 +43,6 @@ #include "mongo/db/repl/roll_back_local_operations.h" #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace { diff --git a/src/mongo/db/repl/rollback_checker.cpp b/src/mongo/db/repl/rollback_checker.cpp index 9089163aae5..20cf50bddf0 100644 --- a/src/mongo/db/repl/rollback_checker.cpp +++ b/src/mongo/db/repl/rollback_checker.cpp @@ -33,7 +33,6 @@ #include "mongo/db/repl/rollback_checker.h" -#include "mongo/util/log.h" 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 3c4bbdd0941..7f55c8c98f9 100644 --- a/src/mongo/db/repl/rollback_checker_test.cpp +++ b/src/mongo/db/repl/rollback_checker_test.cpp @@ -37,7 +37,6 @@ #include "mongo/executor/network_interface_mock.h" #include "mongo/executor/thread_pool_task_executor_test_fixture.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace { diff --git a/src/mongo/db/repl/rollback_impl.cpp b/src/mongo/db/repl/rollback_impl.cpp index 26c9c1a0fd4..9acc27a0149 100644 --- a/src/mongo/db/repl/rollback_impl.cpp +++ b/src/mongo/db/repl/rollback_impl.cpp @@ -64,7 +64,6 @@ #include "mongo/db/transaction_history_iterator.h" #include "mongo/logv2/log.h" #include "mongo/s/catalog/type_config_version.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/repl/rollback_impl_test.cpp b/src/mongo/db/repl/rollback_impl_test.cpp index fa5b5af0a96..47249dcd124 100644 --- a/src/mongo/db/repl/rollback_impl_test.cpp +++ b/src/mongo/db/repl/rollback_impl_test.cpp @@ -55,7 +55,6 @@ #include "mongo/transport/transport_layer_mock.h" #include "mongo/unittest/death_test.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/uuid.h" namespace { diff --git a/src/mongo/db/repl/rs_rollback.cpp b/src/mongo/db/repl/rs_rollback.cpp index f11d195259d..44121aa170d 100644 --- a/src/mongo/db/repl/rs_rollback.cpp +++ b/src/mongo/db/repl/rs_rollback.cpp @@ -82,7 +82,6 @@ #include "mongo/s/grid.h" #include "mongo/util/exit.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/repl/scatter_gather_runner.cpp b/src/mongo/db/repl/scatter_gather_runner.cpp index 9986987b3f4..cea5ed2ed71 100644 --- a/src/mongo/db/repl/scatter_gather_runner.cpp +++ b/src/mongo/db/repl/scatter_gather_runner.cpp @@ -40,7 +40,6 @@ #include "mongo/db/repl/scatter_gather_algorithm.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/repl/session_update_tracker.cpp b/src/mongo/db/repl/session_update_tracker.cpp index f3e381995e2..edf8654a0af 100644 --- a/src/mongo/db/repl/session_update_tracker.cpp +++ b/src/mongo/db/repl/session_update_tracker.cpp @@ -41,7 +41,6 @@ #include "mongo/db/transaction_participant_gen.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/speculative_majority_read_info.cpp b/src/mongo/db/repl/speculative_majority_read_info.cpp index 76c2d9e89e2..19d7861850f 100644 --- a/src/mongo/db/repl/speculative_majority_read_info.cpp +++ b/src/mongo/db/repl/speculative_majority_read_info.cpp @@ -36,7 +36,6 @@ #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/repl/speculative_majority_read_info.h" #include "mongo/util/decorable.h" -#include "mongo/util/log.h" namespace mongo { namespace repl { diff --git a/src/mongo/db/repl/split_horizon.cpp b/src/mongo/db/repl/split_horizon.cpp index 10a942c632d..35566080661 100644 --- a/src/mongo/db/repl/split_horizon.cpp +++ b/src/mongo/db/repl/split_horizon.cpp @@ -37,7 +37,6 @@ #include "mongo/bson/util/bson_extract.h" #include "mongo/db/client.h" -#include "mongo/util/log.h" using namespace std::literals::string_literals; diff --git a/src/mongo/db/repl/storage_interface_impl.cpp b/src/mongo/db/repl/storage_interface_impl.cpp index 69ebcfdbcd1..bbbf34c3cd2 100644 --- a/src/mongo/db/repl/storage_interface_impl.cpp +++ b/src/mongo/db/repl/storage_interface_impl.cpp @@ -79,7 +79,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" #include "mongo/util/background.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/repl/storage_interface_mock.cpp b/src/mongo/db/repl/storage_interface_mock.cpp index 30d60626641..881e7564804 100644 --- a/src/mongo/db/repl/storage_interface_mock.cpp +++ b/src/mongo/db/repl/storage_interface_mock.cpp @@ -35,7 +35,6 @@ #include "mongo/db/repl/storage_interface_mock.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/repl/sync_source_feedback.cpp b/src/mongo/db/repl/sync_source_feedback.cpp index 0fc2f3f16ac..31270a850c0 100644 --- a/src/mongo/db/repl/sync_source_feedback.cpp +++ b/src/mongo/db/repl/sync_source_feedback.cpp @@ -41,7 +41,6 @@ #include "mongo/executor/task_executor.h" #include "mongo/logv2/log.h" #include "mongo/util/concurrency/idle_thread_block.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/scopeguard.h" #include "mongo/util/time_support.h" diff --git a/src/mongo/db/repl/sync_source_resolver.cpp b/src/mongo/db/repl/sync_source_resolver.cpp index 8ecdad2ebe4..baba3e08744 100644 --- a/src/mongo/db/repl/sync_source_resolver.cpp +++ b/src/mongo/db/repl/sync_source_resolver.cpp @@ -43,7 +43,6 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/util/assert_util.h" #include "mongo/util/destructor_guard.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/repl/task_runner.cpp b/src/mongo/db/repl/task_runner.cpp index 5889b149393..87126dbcc64 100644 --- a/src/mongo/db/repl/task_runner.cpp +++ b/src/mongo/db/repl/task_runner.cpp @@ -44,7 +44,6 @@ #include "mongo/util/assert_util.h" #include "mongo/util/concurrency/thread_name.h" #include "mongo/util/destructor_guard.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/repl/topology_coordinator_v1_test.cpp b/src/mongo/db/repl/topology_coordinator_v1_test.cpp index 7bad4543d4e..a578d50689d 100644 --- a/src/mongo/db/repl/topology_coordinator_v1_test.cpp +++ b/src/mongo/db/repl/topology_coordinator_v1_test.cpp @@ -50,7 +50,6 @@ #include "mongo/rpc/metadata/repl_set_metadata.h" #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/log_global_settings.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/net/socket_utils.h" diff --git a/src/mongo/db/repl/topology_version_observer_test.cpp b/src/mongo/db/repl/topology_version_observer_test.cpp index 793631cb075..81532419f16 100644 --- a/src/mongo/db/repl/topology_version_observer_test.cpp +++ b/src/mongo/db/repl/topology_version_observer_test.cpp @@ -45,7 +45,6 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" #include "mongo/util/clock_source.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/db/repl/transaction_oplog_application.cpp b/src/mongo/db/repl/transaction_oplog_application.cpp index 99185e45c14..5d6a48bfbb5 100644 --- a/src/mongo/db/repl/transaction_oplog_application.cpp +++ b/src/mongo/db/repl/transaction_oplog_application.cpp @@ -46,7 +46,6 @@ #include "mongo/db/transaction_history_iterator.h" #include "mongo/db/transaction_participant.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { using repl::OplogEntry; diff --git a/src/mongo/db/s/active_shard_collection_registry_test.cpp b/src/mongo/db/s/active_shard_collection_registry_test.cpp index 86d5268513c..6aed719ded2 100644 --- a/src/mongo/db/s/active_shard_collection_registry_test.cpp +++ b/src/mongo/db/s/active_shard_collection_registry_test.cpp @@ -36,7 +36,6 @@ #include "mongo/db/service_context_d_test_fixture.h" #include "mongo/s/request_types/shard_collection_gen.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/add_shard_cmd.cpp b/src/mongo/db/s/add_shard_cmd.cpp index 3d0e43ea33c..c2e8e3684a2 100644 --- a/src/mongo/db/s/add_shard_cmd.cpp +++ b/src/mongo/db/s/add_shard_cmd.cpp @@ -43,7 +43,6 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/s/balancer_configuration.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/balancer/balancer.cpp b/src/mongo/db/s/balancer/balancer.cpp index 212b6d79713..5c4b267034f 100644 --- a/src/mongo/db/s/balancer/balancer.cpp +++ b/src/mongo/db/s/balancer/balancer.cpp @@ -57,7 +57,6 @@ #include "mongo/util/concurrency/idle_thread_block.h" #include "mongo/util/exit.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/timer.h" #include "mongo/util/version.h" 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 9f50b4f5169..5b18930c30b 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 @@ -46,7 +46,6 @@ #include "mongo/s/catalog/type_tags.h" #include "mongo/s/catalog_cache.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/balancer/balancer_policy.cpp b/src/mongo/db/s/balancer/balancer_policy.cpp index 44e3f1302b5..3fc275c2d33 100644 --- a/src/mongo/db/s/balancer/balancer_policy.cpp +++ b/src/mongo/db/s/balancer/balancer_policy.cpp @@ -40,7 +40,6 @@ #include "mongo/s/catalog/type_shard.h" #include "mongo/s/catalog/type_tags.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/balancer/balancer_policy_test.cpp b/src/mongo/db/s/balancer/balancer_policy_test.cpp index d7b82b2240a..4ca3a5b185b 100644 --- a/src/mongo/db/s/balancer/balancer_policy_test.cpp +++ b/src/mongo/db/s/balancer/balancer_policy_test.cpp @@ -36,7 +36,6 @@ #include "mongo/platform/random.h" #include "mongo/s/catalog/type_chunk.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" 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 73e47dd5c9d..ec0f946299e 100644 --- a/src/mongo/db/s/balancer/cluster_statistics_impl.cpp +++ b/src/mongo/db/s/balancer/cluster_statistics_impl.cpp @@ -43,7 +43,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/shard_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/balancer/migration_manager.cpp b/src/mongo/db/s/balancer/migration_manager.cpp index a14202c643d..4a1d614d34d 100644 --- a/src/mongo/db/s/balancer/migration_manager.cpp +++ b/src/mongo/db/s/balancer/migration_manager.cpp @@ -50,7 +50,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/move_chunk_request.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/scopeguard.h" diff --git a/src/mongo/db/s/balancer/migration_test_fixture.h b/src/mongo/db/s/balancer/migration_test_fixture.h index 56757bc96df..cc823fb701f 100644 --- a/src/mongo/db/s/balancer/migration_test_fixture.h +++ b/src/mongo/db/s/balancer/migration_test_fixture.h @@ -44,7 +44,6 @@ #include "mongo/s/catalog/type_tags.h" #include "mongo/s/config_server_test_fixture.h" #include "mongo/s/database_version_helpers.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/balancer/scoped_migration_request.cpp b/src/mongo/db/s/balancer/scoped_migration_request.cpp index b06cb1fa9f0..f44956aff83 100644 --- a/src/mongo/db/s/balancer/scoped_migration_request.cpp +++ b/src/mongo/db/s/balancer/scoped_migration_request.cpp @@ -38,7 +38,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" 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 87a682d941b..90982427c82 100644 --- a/src/mongo/db/s/check_sharding_index_command.cpp +++ b/src/mongo/db/s/check_sharding_index_command.cpp @@ -37,7 +37,6 @@ #include "mongo/db/catalog_raii.h" #include "mongo/db/commands.h" #include "mongo/db/keypattern.h" -#include "mongo/util/log.h" namespace mongo { 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 66966957437..44c32327eff 100644 --- a/src/mongo/db/s/chunk_move_write_concern_options.cpp +++ b/src/mongo/db/s/chunk_move_write_concern_options.cpp @@ -38,7 +38,6 @@ #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/service_context.h" #include "mongo/s/request_types/migration_secondary_throttle_options.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/chunk_splitter.cpp b/src/mongo/db/s/chunk_splitter.cpp index 3c420e838fb..9a918df0e93 100644 --- a/src/mongo/db/s/chunk_splitter.cpp +++ b/src/mongo/db/s/chunk_splitter.cpp @@ -53,7 +53,6 @@ #include "mongo/s/grid.h" #include "mongo/s/shard_key_pattern.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/cleanup_orphaned_cmd.cpp b/src/mongo/db/s/cleanup_orphaned_cmd.cpp index b7b565f6726..1e828c97ac7 100644 --- a/src/mongo/db/s/cleanup_orphaned_cmd.cpp +++ b/src/mongo/db/s/cleanup_orphaned_cmd.cpp @@ -50,7 +50,6 @@ #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" #include "mongo/s/request_types/migration_secondary_throttle_options.h" -#include "mongo/util/log.h" 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 dda7e8e7485..2581d0ccfbe 100644 --- a/src/mongo/db/s/clone_catalog_data_command.cpp +++ b/src/mongo/db/s/clone_catalog_data_command.cpp @@ -41,7 +41,6 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/clone_catalog_data_gen.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/clone_collection_options_from_primary_shard_cmd.cpp b/src/mongo/db/s/clone_collection_options_from_primary_shard_cmd.cpp index 7f7439ae15b..5f89314594a 100644 --- a/src/mongo/db/s/clone_collection_options_from_primary_shard_cmd.cpp +++ b/src/mongo/db/s/clone_collection_options_from_primary_shard_cmd.cpp @@ -37,7 +37,6 @@ #include "mongo/db/s/shard_filtering_metadata_refresh.h" #include "mongo/s/request_types/clone_collection_options_from_primary_shard_gen.h" #include "mongo/s/shard_id.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/collection_metadata.cpp b/src/mongo/db/s/collection_metadata.cpp index aca45d987ae..0738c4e1cee 100644 --- a/src/mongo/db/s/collection_metadata.cpp +++ b/src/mongo/db/s/collection_metadata.cpp @@ -39,7 +39,6 @@ #include "mongo/bson/util/builder.h" #include "mongo/db/bson/dotted_path_support.h" #include "mongo/s/catalog/type_chunk.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/collection_sharding_runtime.cpp b/src/mongo/db/s/collection_sharding_runtime.cpp index d2ce632ad95..9d0b1d4cdcc 100644 --- a/src/mongo/db/s/collection_sharding_runtime.cpp +++ b/src/mongo/db/s/collection_sharding_runtime.cpp @@ -41,7 +41,6 @@ #include "mongo/db/s/sharding_state.h" #include "mongo/logv2/log.h" #include "mongo/util/duration.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/collection_sharding_state.cpp b/src/mongo/db/s/collection_sharding_state.cpp index e3a9d0d9f47..0bd4b0d3ee5 100644 --- a/src/mongo/db/s/collection_sharding_state.cpp +++ b/src/mongo/db/s/collection_sharding_state.cpp @@ -36,7 +36,6 @@ #include "mongo/db/repl/read_concern_args.h" #include "mongo/s/stale_exception.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/string_map.h" namespace mongo { 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 6f6b449b0cf..414370cfc23 100644 --- a/src/mongo/db/s/config/configsvr_add_shard_command.cpp +++ b/src/mongo/db/s/config/configsvr_add_shard_command.cpp @@ -46,7 +46,6 @@ #include "mongo/s/catalog/type_shard.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/add_shard_request_type.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { 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 6b6974b082f..bc9aa04eaad 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 @@ -40,7 +40,6 @@ #include "mongo/db/s/config/sharding_catalog_manager.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/add_shard_to_zone_request_type.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { 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 e281e5df01a..c8d1b7e8743 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 @@ -49,7 +49,6 @@ #include "mongo/s/catalog_cache_loader.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/balancer_collection_status_gen.h" -#include "mongo/util/log.h" 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 8779bd3e48c..736dfc16e6f 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 @@ -39,7 +39,6 @@ #include "mongo/s/catalog/dist_lock_manager.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/clear_jumbo_flag_gen.h" -#include "mongo/util/log.h" 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 eefa1012b2f..3fc7aeefc48 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 @@ -47,7 +47,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/commit_chunk_migration_request_type.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_commit_move_primary_command.cpp b/src/mongo/db/s/config/configsvr_commit_move_primary_command.cpp index ea920e9c31d..a221b6bc314 100644 --- a/src/mongo/db/s/config/configsvr_commit_move_primary_command.cpp +++ b/src/mongo/db/s/config/configsvr_commit_move_primary_command.cpp @@ -36,7 +36,6 @@ #include "mongo/db/repl/read_concern_args.h" #include "mongo/db/s/config/sharding_catalog_manager.h" #include "mongo/s/request_types/move_primary_gen.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/config/configsvr_create_collection_command.cpp b/src/mongo/db/s/config/configsvr_create_collection_command.cpp index 2ac40d3bc23..ddda9b19d99 100644 --- a/src/mongo/db/s/config/configsvr_create_collection_command.cpp +++ b/src/mongo/db/s/config/configsvr_create_collection_command.cpp @@ -44,7 +44,6 @@ #include "mongo/db/s/config/sharding_catalog_manager.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/create_collection_gen.h" -#include "mongo/util/log.h" namespace mongo { namespace { 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 78fd446c168..60211eee6f7 100644 --- a/src/mongo/db/s/config/configsvr_create_database_command.cpp +++ b/src/mongo/db/s/config/configsvr_create_database_command.cpp @@ -46,7 +46,6 @@ #include "mongo/s/catalog_cache.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/create_database_gen.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_drop_collection_command.cpp b/src/mongo/db/s/config/configsvr_drop_collection_command.cpp index 938aa7ab9a7..1ee60430d63 100644 --- a/src/mongo/db/s/config/configsvr_drop_collection_command.cpp +++ b/src/mongo/db/s/config/configsvr_drop_collection_command.cpp @@ -45,7 +45,6 @@ #include "mongo/s/grid.h" #include "mongo/s/stale_exception.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_drop_database_command.cpp b/src/mongo/db/s/config/configsvr_drop_database_command.cpp index 68a296a0716..a6854cd2bfa 100644 --- a/src/mongo/db/s/config/configsvr_drop_database_command.cpp +++ b/src/mongo/db/s/config/configsvr_drop_database_command.cpp @@ -41,7 +41,6 @@ #include "mongo/s/catalog/type_database.h" #include "mongo/s/catalog_cache.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_enable_sharding_command.cpp b/src/mongo/db/s/config/configsvr_enable_sharding_command.cpp index 0ab3a6e3d18..6f505be2242 100644 --- a/src/mongo/db/s/config/configsvr_enable_sharding_command.cpp +++ b/src/mongo/db/s/config/configsvr_enable_sharding_command.cpp @@ -46,7 +46,6 @@ #include "mongo/s/catalog/type_database.h" #include "mongo/s/catalog_cache.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_merge_chunk_command.cpp b/src/mongo/db/s/config/configsvr_merge_chunk_command.cpp index e9ad4d92564..d9011124599 100644 --- a/src/mongo/db/s/config/configsvr_merge_chunk_command.cpp +++ b/src/mongo/db/s/config/configsvr_merge_chunk_command.cpp @@ -41,7 +41,6 @@ #include "mongo/db/s/config/sharding_catalog_manager.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/merge_chunk_request_type.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { 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 ab8c8e752ec..c9a3649cfa1 100644 --- a/src/mongo/db/s/config/configsvr_move_chunk_command.cpp +++ b/src/mongo/db/s/config/configsvr_move_chunk_command.cpp @@ -40,7 +40,6 @@ #include "mongo/db/repl/read_concern_args.h" #include "mongo/db/s/balancer/balancer.h" #include "mongo/s/request_types/balance_chunk_request_type.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_move_primary_command.cpp b/src/mongo/db/s/config/configsvr_move_primary_command.cpp index 1595d7fdcdd..53eb5aa552f 100644 --- a/src/mongo/db/s/config/configsvr_move_primary_command.cpp +++ b/src/mongo/db/s/config/configsvr_move_primary_command.cpp @@ -51,7 +51,6 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/move_primary_gen.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { 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 3d862d632d1..31ad17062b1 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 @@ -42,7 +42,6 @@ #include "mongo/s/catalog/dist_lock_manager.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/refine_collection_shard_key_gen.h" -#include "mongo/util/log.h" 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 2b3cfc9a1ae..4c0dc80a658 100644 --- a/src/mongo/db/s/config/configsvr_remove_shard_command.cpp +++ b/src/mongo/db/s/config/configsvr_remove_shard_command.cpp @@ -47,7 +47,6 @@ #include "mongo/s/catalog_cache.h" #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { 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 2f3fb559fe2..fd45f0fd824 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 @@ -40,7 +40,6 @@ #include "mongo/db/s/config/sharding_catalog_manager.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/remove_shard_from_zone_request_type.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp index 4fca10fda03..506597f1e35 100644 --- a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp +++ b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp @@ -54,7 +54,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/config_server_client.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" 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 5451137ad59..a889acbeeb3 100644 --- a/src/mongo/db/s/config/configsvr_split_chunk_command.cpp +++ b/src/mongo/db/s/config/configsvr_split_chunk_command.cpp @@ -41,7 +41,6 @@ #include "mongo/db/s/config/sharding_catalog_manager.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/split_chunk_request_type.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { 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 ebab9d7a4d6..cad9f088310 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 @@ -40,7 +40,6 @@ #include "mongo/db/s/config/sharding_catalog_manager.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/update_zone_key_range_request_type.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/config/initial_split_policy.cpp b/src/mongo/db/s/config/initial_split_policy.cpp index 6826a1c8123..d89d3706806 100644 --- a/src/mongo/db/s/config/initial_split_policy.cpp +++ b/src/mongo/db/s/config/initial_split_policy.cpp @@ -40,7 +40,6 @@ #include "mongo/s/catalog/type_shard.h" #include "mongo/s/grid.h" #include "mongo/s/shard_util.h" -#include "mongo/util/log.h" 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 7d4309aa4fb..739965ffc19 100644 --- a/src/mongo/db/s/config/initial_split_policy_test.cpp +++ b/src/mongo/db/s/config/initial_split_policy_test.cpp @@ -38,7 +38,6 @@ #include "mongo/s/catalog/type_tags.h" #include "mongo/s/config_server_test_fixture.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/config/namespace_serializer.cpp b/src/mongo/db/s/config/namespace_serializer.cpp index 6c69eaa668d..f45905448a2 100644 --- a/src/mongo/db/s/config/namespace_serializer.cpp +++ b/src/mongo/db/s/config/namespace_serializer.cpp @@ -38,7 +38,6 @@ #include "mongo/db/namespace_string.h" #include "mongo/db/operation_context.h" #include "mongo/db/s/config/sharding_catalog_manager.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/config/sharding_catalog_manager.cpp b/src/mongo/db/s/config/sharding_catalog_manager.cpp index a02a6b3471c..6e8ae6c1700 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager.cpp @@ -55,7 +55,6 @@ #include "mongo/s/write_ops/batched_command_request.h" #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/transport/service_entry_point.h" -#include "mongo/util/log.h" 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 c061abbc813..422e0438380 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 @@ -54,7 +54,6 @@ #include "mongo/s/database_version_helpers.h" #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { 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 10e0ef8dc0e..cdcdf555405 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 @@ -45,6 +45,7 @@ #include "mongo/db/repl/repl_client_info.h" #include "mongo/db/s/sharding_logging.h" #include "mongo/db/server_options.h" +#include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/s/catalog/sharding_catalog_client.h" #include "mongo/s/catalog/type_chunk.h" @@ -53,7 +54,6 @@ #include "mongo/s/grid.h" #include "mongo/s/shard_key_pattern.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { @@ -1102,9 +1102,12 @@ void ShardingCatalogManager::ensureChunkVersionIsGreaterThan(OperationContext* o if (matchingChunksVector.empty()) { // This can happen in a number of cases, such as that the collection has been dropped, its // shard key has been refined, the chunk has been split, or the chunk has been merged. - LOG(0) << "ensureChunkVersionIsGreaterThan did not find any chunks with minKey " << minKey - << ", maxKey " << maxKey << ", and epoch " << version.epoch() - << ". Returning success."; + LOGV2(23884, + "ensureChunkVersionIsGreaterThan did not find any chunks with minKey {minKey}, " + "maxKey {maxKey}, and epoch {version_epoch}. Returning success.", + "minKey"_attr = minKey, + "maxKey"_attr = maxKey, + "version_epoch"_attr = version.epoch()); return; } @@ -1112,10 +1115,15 @@ void ShardingCatalogManager::ensureChunkVersionIsGreaterThan(OperationContext* o uassertStatusOK(ChunkType::fromConfigBSON(matchingChunksVector.front())); if (version.isOlderThan(currentChunk.getVersion())) { - LOG(0) << "ensureChunkVersionIsGreaterThan found that the chunk with minKey " << minKey - << ", maxKey " << maxKey << ", and epoch " << version.epoch() - << " already has a higher version than " << version << ". Current chunk is " - << currentChunk.toConfigBSON() << ". Returning success."; + LOGV2(23885, + "ensureChunkVersionIsGreaterThan found that the chunk with minKey {minKey}, maxKey " + "{maxKey}, and epoch {version_epoch} already has a higher version than {version}. " + "Current chunk is {currentChunk_toConfigBSON}. Returning success.", + "minKey"_attr = minKey, + "maxKey"_attr = maxKey, + "version_epoch"_attr = version.epoch(), + "version"_attr = version, + "currentChunk_toConfigBSON"_attr = currentChunk.toConfigBSON()); return; } @@ -1131,10 +1139,11 @@ void ShardingCatalogManager::ensureChunkVersionIsGreaterThan(OperationContext* o 1 /* limit */)) .docs; if (highestChunksVector.empty()) { - LOG(0) << "ensureChunkVersionIsGreaterThan did not find any chunks with epoch " - << version.epoch() - << " when attempting to find the collectionVersion. The collection must have been " - "dropped concurrently. Returning success."; + LOGV2(23886, + "ensureChunkVersionIsGreaterThan did not find any chunks with epoch {version_epoch} " + "when attempting to find the collectionVersion. The collection must have been " + "dropped concurrently. Returning success.", + "version_epoch"_attr = version.epoch()); return; } const auto highestChunk = @@ -1155,14 +1164,23 @@ void ShardingCatalogManager::ensureChunkVersionIsGreaterThan(OperationContext* o false /* upsert */, kNoWaitWriteConcern)); if (didUpdate) { - LOG(0) << "ensureChunkVersionIsGreaterThan bumped the version of the chunk with minKey " - << minKey << ", maxKey " << maxKey << ", and epoch " << version.epoch() - << ". Chunk is now " << newChunk.toConfigBSON(); + LOGV2( + 23887, + "ensureChunkVersionIsGreaterThan bumped the version of the chunk with minKey {minKey}, " + "maxKey {maxKey}, and epoch {version_epoch}. Chunk is now {newChunk_toConfigBSON}", + "minKey"_attr = minKey, + "maxKey"_attr = maxKey, + "version_epoch"_attr = version.epoch(), + "newChunk_toConfigBSON"_attr = newChunk.toConfigBSON()); } else { - LOG(0) << "ensureChunkVersionIsGreaterThan did not find a chunk matching minKey " << minKey - << ", maxKey " << maxKey << ", and epoch " << version.epoch() - << " when trying to bump its version. The collection must have been dropped " - "concurrently. Returning success."; + LOGV2(23888, + "ensureChunkVersionIsGreaterThan did not find a chunk matching minKey {minKey}, " + "maxKey {maxKey}, and epoch {version_epoch} when trying to bump its version. The " + "collection must have been dropped " + "concurrently. Returning success.", + "minKey"_attr = minKey, + "maxKey"_attr = maxKey, + "version_epoch"_attr = version.epoch()); } } 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 49ce207adf2..7e05e1437a7 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 @@ -75,7 +75,6 @@ #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/transport/service_entry_point.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/s/config/sharding_catalog_manager_create_collection_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_create_collection_test.cpp index 7fd56297e96..a25e50b0f4b 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_create_collection_test.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_create_collection_test.cpp @@ -49,7 +49,6 @@ #include "mongo/s/grid.h" #include "mongo/s/shard_key_pattern.h" #include "mongo/stdx/future.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/config/sharding_catalog_manager_create_database_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_create_database_test.cpp index faa2fecfdf0..3fac0d6e5eb 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_create_database_test.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_create_database_test.cpp @@ -43,7 +43,6 @@ #include "mongo/s/catalog/type_database.h" #include "mongo/s/catalog/type_shard.h" #include "mongo/s/config_server_test_fixture.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { 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 c46a65966a7..483c2c0b018 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 @@ -47,7 +47,6 @@ #include "mongo/s/grid.h" #include "mongo/s/shard_id.h" #include "mongo/s/shard_util.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/config/sharding_catalog_manager_enable_sharding_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_enable_sharding_test.cpp index 4e573555acc..af13425402e 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager_enable_sharding_test.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager_enable_sharding_test.cpp @@ -46,7 +46,6 @@ #include "mongo/s/config_server_test_fixture.h" #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/stdx/future.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { 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 1a596651ded..e01fcf55b6e 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 @@ -53,7 +53,6 @@ #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/stdx/chrono.h" #include "mongo/stdx/future.h" -#include "mongo/util/log.h" 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 df5ce39bbeb..9181f86a09d 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 @@ -47,7 +47,6 @@ #include "mongo/s/config_server_test_fixture.h" #include "mongo/s/grid.h" #include "mongo/s/shard_key_pattern.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/time_support.h" 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 b2148656e52..d0d0d9f985e 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 @@ -74,7 +74,6 @@ #include "mongo/s/write_ops/batched_command_request.h" #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" 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 edb3d7c6d81..2c199a69337 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 @@ -47,7 +47,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/shard_key_pattern.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/database_sharding_state.cpp b/src/mongo/db/s/database_sharding_state.cpp index ed018daec96..4052917dcec 100644 --- a/src/mongo/db/s/database_sharding_state.cpp +++ b/src/mongo/db/s/database_sharding_state.cpp @@ -39,7 +39,6 @@ #include "mongo/s/database_version_helpers.h" #include "mongo/s/stale_exception.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" 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 8b06a59c2cc..5b5ff581996 100644 --- a/src/mongo/db/s/flush_database_cache_updates_command.cpp +++ b/src/mongo/db/s/flush_database_cache_updates_command.cpp @@ -51,7 +51,6 @@ #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { 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 3359431d84a..8430f97e89f 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 @@ -48,7 +48,6 @@ #include "mongo/s/catalog_cache_loader.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/flush_routing_table_cache_updates_gen.h" -#include "mongo/util/log.h" 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 98d701bfe40..d5418cb7951 100644 --- a/src/mongo/db/s/get_shard_version_command.cpp +++ b/src/mongo/db/s/get_shard_version_command.cpp @@ -41,7 +41,6 @@ #include "mongo/db/s/sharded_connection_info.h" #include "mongo/db/s/sharding_state.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/merge_chunks_command.cpp b/src/mongo/db/s/merge_chunks_command.cpp index 5fd4574590b..317510ef4ad 100644 --- a/src/mongo/db/s/merge_chunks_command.cpp +++ b/src/mongo/db/s/merge_chunks_command.cpp @@ -47,7 +47,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/merge_chunk_request_type.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/metadata_manager.cpp b/src/mongo/db/s/metadata_manager.cpp index 669b95c59b9..4523d1761d8 100644 --- a/src/mongo/db/s/metadata_manager.cpp +++ b/src/mongo/db/s/metadata_manager.cpp @@ -46,7 +46,6 @@ #include "mongo/s/grid.h" #include "mongo/util/assert_util.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { 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 76dd0bcde8e..0b6d87cd791 100644 --- a/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp +++ b/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp @@ -57,7 +57,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/util/elapsed_tracker.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" #include "mongo/util/time_support.h" diff --git a/src/mongo/db/s/migration_coordinator.cpp b/src/mongo/db/s/migration_coordinator.cpp index aaacbc145c7..1e38cc4060c 100644 --- a/src/mongo/db/s/migration_coordinator.cpp +++ b/src/mongo/db/s/migration_coordinator.cpp @@ -35,8 +35,8 @@ #include "mongo/db/s/migration_util.h" #include "mongo/db/s/range_deletion_task_gen.h" +#include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { @@ -75,10 +75,13 @@ MigrationCoordinator::MigrationCoordinator(UUID migrationId, MigrationCoordinator::~MigrationCoordinator() = default; void MigrationCoordinator::startMigration(OperationContext* opCtx) { - LOG(0) << _logPrefix() << "Persisting migration coordinator doc"; + LOGV2( + 23889, "{logPrefix}Persisting migration coordinator doc", "logPrefix"_attr = _logPrefix()); migrationutil::persistMigrationCoordinatorLocally(opCtx, _migrationInfo); - LOG(0) << _logPrefix() << "Persisting range deletion task on donor"; + LOGV2(23890, + "{logPrefix}Persisting range deletion task on donor", + "logPrefix"_attr = _logPrefix()); RangeDeletionTask donorDeletionTask(_migrationInfo.getId(), _migrationInfo.getNss(), _migrationInfo.getCollectionUuid(), @@ -91,25 +94,34 @@ void MigrationCoordinator::startMigration(OperationContext* opCtx) { } void MigrationCoordinator::setMigrationDecision(Decision decision) { - LOG(0) << _logPrefix() << "MigrationCoordinator setting migration decision to " - << (decision == Decision::kCommitted ? "committed" : "aborted"); + LOGV2(23891, + "{logPrefix}MigrationCoordinator setting migration decision to " + "{decision_Decision_kCommitted_committed_aborted}", + "logPrefix"_attr = _logPrefix(), + "decision_Decision_kCommitted_committed_aborted"_attr = + (decision == Decision::kCommitted ? "committed" : "aborted")); _decision = decision; } boost::optional> MigrationCoordinator::completeMigration(OperationContext* opCtx) { if (!_decision) { - LOG(0) << _logPrefix() - << "Migration completed without setting a decision. This node might have started " - "stepping down or shutting down after having initiated commit against the config " - "server but before having found out if the commit succeeded. The new primary of " - "this replica set will complete the migration coordination."; + LOGV2(23892, + "{logPrefix}Migration completed without setting a decision. This node might have " + "started " + "stepping down or shutting down after having initiated commit against the config " + "server but before having found out if the commit succeeded. The new primary of " + "this replica set will complete the migration coordination.", + "logPrefix"_attr = _logPrefix()); return boost::none; } - LOG(0) << _logPrefix() << "MigrationCoordinator delivering decision " - << (_decision == Decision::kCommitted ? "committed" : "aborted") - << " to self and to recipient"; + LOGV2(23893, + "{logPrefix}MigrationCoordinator delivering decision " + "{decision_Decision_kCommitted_committed_aborted} to self and to recipient", + "logPrefix"_attr = _logPrefix(), + "decision_Decision_kCommitted_committed_aborted"_attr = + (_decision == Decision::kCommitted ? "committed" : "aborted")); boost::optional> cleanupCompleteFuture = boost::none; @@ -133,26 +145,37 @@ SemiFuture MigrationCoordinator::_commitMigrationOnDonorAndRecipient( OperationContext* opCtx) { hangBeforeMakingCommitDecisionDurable.pauseWhileSet(); - LOG(0) << _logPrefix() << "Making commit decision durable"; + LOGV2(23894, "{logPrefix}Making commit decision durable", "logPrefix"_attr = _logPrefix()); migrationutil::persistCommitDecision(opCtx, _migrationInfo.getId()); - LOG(0) << _logPrefix() << "Bumping transaction for " << _migrationInfo.getRecipientShardId() - << " lsid: " << _migrationInfo.getLsid().toBSON() << " txn: " << TxnNumber{1}; + LOGV2(23895, + "{logPrefix}Bumping transaction for {migrationInfo_getRecipientShardId} lsid: " + "{migrationInfo_getLsid} txn: {TxnNumber_1}", + "logPrefix"_attr = _logPrefix(), + "migrationInfo_getRecipientShardId"_attr = _migrationInfo.getRecipientShardId(), + "migrationInfo_getLsid"_attr = _migrationInfo.getLsid().toBSON(), + "TxnNumber_1"_attr = TxnNumber{1}); migrationutil::advanceTransactionOnRecipient( opCtx, _migrationInfo.getRecipientShardId(), _migrationInfo.getLsid(), TxnNumber{1}); hangBeforeSendingCommitDecision.pauseWhileSet(); - LOG(0) << _logPrefix() << "Deleting range deletion task on recipient"; + LOGV2(23896, + "{logPrefix}Deleting range deletion task on recipient", + "logPrefix"_attr = _logPrefix()); migrationutil::deleteRangeDeletionTaskOnRecipient( opCtx, _migrationInfo.getRecipientShardId(), _migrationInfo.getId()); - LOG(0) << _logPrefix() << "Marking range deletion task on donor as ready for processing"; + LOGV2(23897, + "{logPrefix}Marking range deletion task on donor as ready for processing", + "logPrefix"_attr = _logPrefix()); migrationutil::markAsReadyRangeDeletionTaskLocally(opCtx, _migrationInfo.getId()); // At this point the decision cannot be changed and will be recovered in the event of a // failover, so it is safe to schedule the deletion task after updating the persisted state. - LOG(0) << _logPrefix() << "Scheduling range deletion task on donor"; + LOGV2(23898, + "{logPrefix}Scheduling range deletion task on donor", + "logPrefix"_attr = _logPrefix()); RangeDeletionTask deletionTask(_migrationInfo.getId(), _migrationInfo.getNss(), _migrationInfo.getCollectionUuid(), @@ -165,26 +188,36 @@ SemiFuture MigrationCoordinator::_commitMigrationOnDonorAndRecipient( void MigrationCoordinator::_abortMigrationOnDonorAndRecipient(OperationContext* opCtx) { hangBeforeMakingAbortDecisionDurable.pauseWhileSet(); - LOG(0) << _logPrefix() << "Making abort decision durable"; + LOGV2(23899, "{logPrefix}Making abort decision durable", "logPrefix"_attr = _logPrefix()); migrationutil::persistAbortDecision(opCtx, _migrationInfo.getId()); - LOG(0) << _logPrefix() << "Bumping transaction for " << _migrationInfo.getRecipientShardId() - << " lsid: " << _migrationInfo.getLsid().toBSON() << " txn: " << TxnNumber{1}; + LOGV2(23900, + "{logPrefix}Bumping transaction for {migrationInfo_getRecipientShardId} lsid: " + "{migrationInfo_getLsid} txn: {TxnNumber_1}", + "logPrefix"_attr = _logPrefix(), + "migrationInfo_getRecipientShardId"_attr = _migrationInfo.getRecipientShardId(), + "migrationInfo_getLsid"_attr = _migrationInfo.getLsid().toBSON(), + "TxnNumber_1"_attr = TxnNumber{1}); migrationutil::advanceTransactionOnRecipient( opCtx, _migrationInfo.getRecipientShardId(), _migrationInfo.getLsid(), TxnNumber{1}); hangBeforeSendingAbortDecision.pauseWhileSet(); - LOG(0) << _logPrefix() << "Deleting range deletion task on donor"; + LOGV2( + 23901, "{logPrefix}Deleting range deletion task on donor", "logPrefix"_attr = _logPrefix()); migrationutil::deleteRangeDeletionTaskLocally(opCtx, _migrationInfo.getId()); - LOG(0) << _logPrefix() << "Marking range deletion task on recipient as ready for processing"; + LOGV2(23902, + "{logPrefix}Marking range deletion task on recipient as ready for processing", + "logPrefix"_attr = _logPrefix()); migrationutil::markAsReadyRangeDeletionTaskOnRecipient( opCtx, _migrationInfo.getRecipientShardId(), _migrationInfo.getId()); } void MigrationCoordinator::forgetMigration(OperationContext* opCtx) { - LOG(0) << _logPrefix() << "Deleting migration coordinator document"; + LOGV2(23903, + "{logPrefix}Deleting migration coordinator document", + "logPrefix"_attr = _logPrefix()); migrationutil::deleteMigrationCoordinatorDocumentLocally(opCtx, _migrationInfo.getId()); } diff --git a/src/mongo/db/s/migration_destination_manager.cpp b/src/mongo/db/s/migration_destination_manager.cpp index 8124f36a16f..4ccb3874f09 100644 --- a/src/mongo/db/s/migration_destination_manager.cpp +++ b/src/mongo/db/s/migration_destination_manager.cpp @@ -70,7 +70,6 @@ #include "mongo/s/shard_key_pattern.h" #include "mongo/stdx/chrono.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/producer_consumer_queue.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" 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 50d63eec920..84064273757 100644 --- a/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp +++ b/src/mongo/db/s/migration_destination_manager_legacy_commands.cpp @@ -47,7 +47,6 @@ #include "mongo/s/chunk_version.h" #include "mongo/s/request_types/migration_secondary_throttle_options.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/migration_source_manager.cpp b/src/mongo/db/s/migration_source_manager.cpp index 505622e074d..77382fb15b6 100644 --- a/src/mongo/db/s/migration_source_manager.cpp +++ b/src/mongo/db/s/migration_source_manager.cpp @@ -69,7 +69,6 @@ #include "mongo/util/elapsed_tracker.h" #include "mongo/util/exit.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/migration_util.cpp b/src/mongo/db/s/migration_util.cpp index f5305dae216..75b0c8a24c2 100644 --- a/src/mongo/db/s/migration_util.cpp +++ b/src/mongo/db/s/migration_util.cpp @@ -63,7 +63,6 @@ #include "mongo/s/request_types/ensure_chunk_version_is_greater_than_gen.h" #include "mongo/util/concurrency/thread_pool.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" namespace mongo { namespace migrationutil { @@ -182,8 +181,12 @@ void retryIdempotentWorkUntilSuccess(OperationContext* opCtx, break; } catch (DBException& ex) { if (attempt % kLogRetryAttemptThreshold == 1) { - warning() << "retrying " << taskDescription << " after " << attempt - << " failed attempts, last seen error: " << ex; + LOGV2_WARNING(23937, + "retrying {taskDescription} after {attempt} failed attempts, last " + "seen error: {ex}", + "taskDescription"_attr = taskDescription, + "attempt"_attr = attempt, + "ex"_attr = ex); } } } diff --git a/src/mongo/db/s/move_chunk_command.cpp b/src/mongo/db/s/move_chunk_command.cpp index 23713ad2c55..63f1dd13507 100644 --- a/src/mongo/db/s/move_chunk_command.cpp +++ b/src/mongo/db/s/move_chunk_command.cpp @@ -51,7 +51,6 @@ #include "mongo/util/concurrency/notification.h" #include "mongo/util/concurrency/thread_pool.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/move_primary_command.cpp b/src/mongo/db/s/move_primary_command.cpp index 0d29b270f28..92096a6dedc 100644 --- a/src/mongo/db/s/move_primary_command.cpp +++ b/src/mongo/db/s/move_primary_command.cpp @@ -39,7 +39,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/move_primary_gen.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/move_primary_source_manager.cpp b/src/mongo/db/s/move_primary_source_manager.cpp index c6b97b5b1be..bc3ed4ad159 100644 --- a/src/mongo/db/s/move_primary_source_manager.cpp +++ b/src/mongo/db/s/move_primary_source_manager.cpp @@ -47,7 +47,6 @@ #include "mongo/s/catalog_cache.h" #include "mongo/s/grid.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/move_timing_helper.cpp b/src/mongo/db/s/move_timing_helper.cpp index 7090cf6e009..0e671f212ea 100644 --- a/src/mongo/db/s/move_timing_helper.cpp +++ b/src/mongo/db/s/move_timing_helper.cpp @@ -38,7 +38,6 @@ #include "mongo/db/s/sharding_logging.h" #include "mongo/logv2/log.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/periodic_balancer_config_refresher.cpp b/src/mongo/db/s/periodic_balancer_config_refresher.cpp index 96c33e0ceb3..f6ea4a373be 100644 --- a/src/mongo/db/s/periodic_balancer_config_refresher.cpp +++ b/src/mongo/db/s/periodic_balancer_config_refresher.cpp @@ -38,7 +38,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/balancer_configuration.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { 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 b30403d42ff..5bb45ceec4d 100644 --- a/src/mongo/db/s/periodic_sharded_index_consistency_checker.cpp +++ b/src/mongo/db/s/periodic_sharded_index_consistency_checker.cpp @@ -40,7 +40,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/grid.h" #include "mongo/s/query/cluster_aggregate.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/range_deletion_util.cpp b/src/mongo/db/s/range_deletion_util.cpp index b9a979279de..6022cf096b5 100644 --- a/src/mongo/db/s/range_deletion_util.cpp +++ b/src/mongo/db/s/range_deletion_util.cpp @@ -62,7 +62,6 @@ #include "mongo/executor/task_executor.h" #include "mongo/logv2/log.h" #include "mongo/util/future_util.h" -#include "mongo/util/log.h" namespace mongo { 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 2328a973aef..bfe795894a5 100644 --- a/src/mongo/db/s/scoped_operation_completion_sharding_actions.cpp +++ b/src/mongo/db/s/scoped_operation_completion_sharding_actions.cpp @@ -41,7 +41,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/cannot_implicitly_create_collection_info.h" #include "mongo/s/stale_exception.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/session_catalog_migration_destination.cpp b/src/mongo/db/s/session_catalog_migration_destination.cpp index 9e55b7e2aad..58f16e91711 100644 --- a/src/mongo/db/s/session_catalog_migration_destination.cpp +++ b/src/mongo/db/s/session_catalog_migration_destination.cpp @@ -46,10 +46,10 @@ #include "mongo/db/session_catalog_mongod.h" #include "mongo/db/transaction_participant.h" #include "mongo/db/write_concern.h" +#include "mongo/logger/redaction.h" #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/shard_id.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/set_shard_version_command.cpp b/src/mongo/db/s/set_shard_version_command.cpp index a28ba943bb4..caa73623995 100644 --- a/src/mongo/db/s/set_shard_version_command.cpp +++ b/src/mongo/db/s/set_shard_version_command.cpp @@ -51,7 +51,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/set_shard_version_request.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/shard_filtering_metadata_refresh.cpp b/src/mongo/db/s/shard_filtering_metadata_refresh.cpp index 9df640dc043..a97339898b6 100644 --- a/src/mongo/db/s/shard_filtering_metadata_refresh.cpp +++ b/src/mongo/db/s/shard_filtering_metadata_refresh.cpp @@ -49,7 +49,6 @@ #include "mongo/s/catalog_cache.h" #include "mongo/s/grid.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/shard_metadata_util.cpp b/src/mongo/db/s/shard_metadata_util.cpp index 37500a2ee15..7cbc8d6e59d 100644 --- a/src/mongo/db/s/shard_metadata_util.cpp +++ b/src/mongo/db/s/shard_metadata_util.cpp @@ -46,7 +46,6 @@ #include "mongo/s/catalog/type_shard_database.h" #include "mongo/s/chunk_version.h" #include "mongo/s/write_ops/batched_command_response.h" -#include "mongo/util/log.h" namespace mongo { 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 caf4b68b561..939125ba75f 100644 --- a/src/mongo/db/s/shard_server_op_observer.cpp +++ b/src/mongo/db/s/shard_server_op_observer.cpp @@ -54,7 +54,6 @@ #include "mongo/s/catalog/type_shard_database.h" #include "mongo/s/catalog_cache_loader.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/sharded_connection_info.cpp b/src/mongo/db/s/sharded_connection_info.cpp index 7348c90c486..2624858265c 100644 --- a/src/mongo/db/s/sharded_connection_info.cpp +++ b/src/mongo/db/s/sharded_connection_info.cpp @@ -35,7 +35,6 @@ #include "mongo/db/client.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/sharding_initialization_mongod.cpp b/src/mongo/db/s/sharding_initialization_mongod.cpp index e35e529e9df..c0d8223a467 100644 --- a/src/mongo/db/s/sharding_initialization_mongod.cpp +++ b/src/mongo/db/s/sharding_initialization_mongod.cpp @@ -68,7 +68,6 @@ #include "mongo/s/grid.h" #include "mongo/s/sharding_initialization.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/sharding_logging.cpp b/src/mongo/db/s/sharding_logging.cpp index e714e59e73d..621b176a1ab 100644 --- a/src/mongo/db/s/sharding_logging.cpp +++ b/src/mongo/db/s/sharding_logging.cpp @@ -40,7 +40,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/catalog/type_changelog.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/sharding_logging_test.cpp b/src/mongo/db/s/sharding_logging_test.cpp index 2fefc1ddae0..f0fc4169181 100644 --- a/src/mongo/db/s/sharding_logging_test.cpp +++ b/src/mongo/db/s/sharding_logging_test.cpp @@ -43,7 +43,6 @@ #include "mongo/s/sharding_router_test_fixture.h" #include "mongo/stdx/chrono.h" #include "mongo/stdx/future.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/text.h" diff --git a/src/mongo/db/s/sharding_state.cpp b/src/mongo/db/s/sharding_state.cpp index 50c127f4de0..bf726297d0c 100644 --- a/src/mongo/db/s/sharding_state.cpp +++ b/src/mongo/db/s/sharding_state.cpp @@ -36,7 +36,6 @@ #include "mongo/db/operation_context.h" #include "mongo/db/server_options.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/sharding_state_command.cpp b/src/mongo/db/s/sharding_state_command.cpp index 21cef4c92a1..0d03ac7c311 100644 --- a/src/mongo/db/s/sharding_state_command.cpp +++ b/src/mongo/db/s/sharding_state_command.cpp @@ -38,7 +38,6 @@ #include "mongo/db/s/collection_sharding_state.h" #include "mongo/db/s/sharding_state.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/sharding_state_recovery.cpp b/src/mongo/db/s/sharding_state_recovery.cpp index 98d7a915e49..f14e2b1e279 100644 --- a/src/mongo/db/s/sharding_state_recovery.cpp +++ b/src/mongo/db/s/sharding_state_recovery.cpp @@ -53,7 +53,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/shardsvr_shard_collection.cpp b/src/mongo/db/s/shardsvr_shard_collection.cpp index 61d844b6fe8..22b68045f35 100644 --- a/src/mongo/db/s/shardsvr_shard_collection.cpp +++ b/src/mongo/db/s/shardsvr_shard_collection.cpp @@ -64,7 +64,6 @@ #include "mongo/s/request_types/shard_collection_gen.h" #include "mongo/s/shard_util.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/s/split_chunk.cpp b/src/mongo/db/s/split_chunk.cpp index ee29084c850..88ea1aab764 100644 --- a/src/mongo/db/s/split_chunk.cpp +++ b/src/mongo/db/s/split_chunk.cpp @@ -52,7 +52,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/split_chunk_request_type.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/split_chunk_command.cpp b/src/mongo/db/s/split_chunk_command.cpp index 2bc27bb5fb8..8b509c00f8b 100644 --- a/src/mongo/db/s/split_chunk_command.cpp +++ b/src/mongo/db/s/split_chunk_command.cpp @@ -44,7 +44,6 @@ #include "mongo/db/s/split_chunk.h" #include "mongo/logv2/log.h" #include "mongo/s/catalog/type_chunk.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/split_chunk_test.cpp b/src/mongo/db/s/split_chunk_test.cpp index b18275f72a9..29872644d40 100644 --- a/src/mongo/db/s/split_chunk_test.cpp +++ b/src/mongo/db/s/split_chunk_test.cpp @@ -55,7 +55,6 @@ #include "mongo/s/write_ops/batched_command_request.h" #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/split_vector.cpp b/src/mongo/db/s/split_vector.cpp index 725a60f95b1..0a061077d2a 100644 --- a/src/mongo/db/s/split_vector.cpp +++ b/src/mongo/db/s/split_vector.cpp @@ -45,7 +45,6 @@ #include "mongo/db/query/internal_plans.h" #include "mongo/db/query/plan_executor.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/transaction_coordinator_catalog.cpp b/src/mongo/db/s/transaction_coordinator_catalog.cpp index 0b90a8694f3..13d80cf0b88 100644 --- a/src/mongo/db/s/transaction_coordinator_catalog.cpp +++ b/src/mongo/db/s/transaction_coordinator_catalog.cpp @@ -35,7 +35,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/s/transaction_coordinator_futures_util.cpp b/src/mongo/db/s/transaction_coordinator_futures_util.cpp index f243396228e..506296f0d9f 100644 --- a/src/mongo/db/s/transaction_coordinator_futures_util.cpp +++ b/src/mongo/db/s/transaction_coordinator_futures_util.cpp @@ -41,7 +41,6 @@ #include "mongo/s/grid.h" #include "mongo/transport/service_entry_point.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { namespace txn { diff --git a/src/mongo/db/s/transaction_coordinator_service.cpp b/src/mongo/db/s/transaction_coordinator_service.cpp index 131a79eef8a..4b27021a445 100644 --- a/src/mongo/db/s/transaction_coordinator_service.cpp +++ b/src/mongo/db/s/transaction_coordinator_service.cpp @@ -39,7 +39,6 @@ #include "mongo/db/write_concern.h" #include "mongo/logv2/log.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" 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 73a7370ac2e..b60d1bcfb00 100644 --- a/src/mongo/db/s/transaction_coordinator_service_test.cpp +++ b/src/mongo/db/s/transaction_coordinator_service_test.cpp @@ -38,7 +38,6 @@ #include "mongo/db/s/transaction_coordinator_service.h" #include "mongo/db/s/transaction_coordinator_test_fixture.h" #include "mongo/db/write_concern_options.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/s/transaction_coordinator_test_fixture.cpp b/src/mongo/db/s/transaction_coordinator_test_fixture.cpp index 2891f938e85..3e951dc740a 100644 --- a/src/mongo/db/s/transaction_coordinator_test_fixture.cpp +++ b/src/mongo/db/s/transaction_coordinator_test_fixture.cpp @@ -43,7 +43,6 @@ #include "mongo/s/catalog/sharding_catalog_client_mock.h" #include "mongo/s/catalog/type_shard.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/transaction_coordinator_util.cpp b/src/mongo/db/s/transaction_coordinator_util.cpp index f0968bc0644..7ff54811521 100644 --- a/src/mongo/db/s/transaction_coordinator_util.cpp +++ b/src/mongo/db/s/transaction_coordinator_util.cpp @@ -46,7 +46,6 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { namespace txn { 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 2c335ec636d..d3c4c613e5c 100644 --- a/src/mongo/db/s/txn_two_phase_commit_cmds.cpp +++ b/src/mongo/db/s/txn_two_phase_commit_cmds.cpp @@ -41,7 +41,6 @@ #include "mongo/db/transaction_participant.h" #include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/s/unset_sharding_command.cpp b/src/mongo/db/s/unset_sharding_command.cpp index 61ceb352b0a..2b530b00fb5 100644 --- a/src/mongo/db/s/unset_sharding_command.cpp +++ b/src/mongo/db/s/unset_sharding_command.cpp @@ -38,7 +38,6 @@ #include "mongo/db/commands.h" #include "mongo/db/operation_context.h" #include "mongo/db/s/sharded_connection_info.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/s/wait_for_majority_service.cpp b/src/mongo/db/s/wait_for_majority_service.cpp index d2895908c49..38bb2cade98 100644 --- a/src/mongo/db/s/wait_for_majority_service.cpp +++ b/src/mongo/db/s/wait_for_majority_service.cpp @@ -41,7 +41,6 @@ #include "mongo/executor/thread_pool_task_executor.h" #include "mongo/logv2/log.h" #include "mongo/util/concurrency/thread_pool.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/server_options_helpers.cpp b/src/mongo/db/server_options_helpers.cpp index 116f46a2413..802c9726622 100644 --- a/src/mongo/db/server_options_helpers.cpp +++ b/src/mongo/db/server_options_helpers.cpp @@ -52,7 +52,6 @@ #include "mongo/transport/message_compressor_registry.h" #include "mongo/util/cmdline_utils/censor_cmdline.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/log_global_settings.h" #include "mongo/util/map_util.h" #include "mongo/util/net/sock.h" diff --git a/src/mongo/db/server_options_server_helpers.cpp b/src/mongo/db/server_options_server_helpers.cpp index b1d4409f724..fee004ac6ea 100644 --- a/src/mongo/db/server_options_server_helpers.cpp +++ b/src/mongo/db/server_options_server_helpers.cpp @@ -52,7 +52,6 @@ #include "mongo/transport/message_compressor_registry.h" #include "mongo/util/cmdline_utils/censor_cmdline.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/map_util.h" #include "mongo/util/net/sock.h" #include "mongo/util/net/socket_utils.h" diff --git a/src/mongo/db/service_context.cpp b/src/mongo/db/service_context.cpp index 4f83efcff15..708edcbfd2f 100644 --- a/src/mongo/db/service_context.cpp +++ b/src/mongo/db/service_context.cpp @@ -49,7 +49,6 @@ #include "mongo/transport/session.h" #include "mongo/transport/transport_layer.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/system_clock_source.h" #include "mongo/util/system_tick_source.h" diff --git a/src/mongo/db/service_entry_point_mongod.cpp b/src/mongo/db/service_entry_point_mongod.cpp index f2ad493211e..0057d138926 100644 --- a/src/mongo/db/service_entry_point_mongod.cpp +++ b/src/mongo/db/service_entry_point_mongod.cpp @@ -54,7 +54,6 @@ #include "mongo/s/cannot_implicitly_create_collection_info.h" #include "mongo/s/grid.h" #include "mongo/s/stale_exception.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/service_liaison_mongod.cpp b/src/mongo/db/service_liaison_mongod.cpp index 6e26c6f16e7..a08fa34cf39 100644 --- a/src/mongo/db/service_liaison_mongod.cpp +++ b/src/mongo/db/service_liaison_mongod.cpp @@ -39,7 +39,6 @@ #include "mongo/db/service_context.h" #include "mongo/platform/mutex.h" #include "mongo/util/clock_source.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/service_liaison_mongos.cpp b/src/mongo/db/service_liaison_mongos.cpp index 9abe73ea5c5..6b6e5d75543 100644 --- a/src/mongo/db/service_liaison_mongos.cpp +++ b/src/mongo/db/service_liaison_mongos.cpp @@ -38,7 +38,6 @@ #include "mongo/s/grid.h" #include "mongo/s/query/cluster_cursor_manager.h" #include "mongo/util/clock_source.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/session_catalog.cpp b/src/mongo/db/session_catalog.cpp index 9f21653674b..d86b93e0f01 100644 --- a/src/mongo/db/session_catalog.cpp +++ b/src/mongo/db/session_catalog.cpp @@ -37,7 +37,6 @@ #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/session_catalog_mongod.cpp b/src/mongo/db/session_catalog_mongod.cpp index ca8f411c165..8c5c1a4ddec 100644 --- a/src/mongo/db/session_catalog_mongod.cpp +++ b/src/mongo/db/session_catalog_mongod.cpp @@ -49,7 +49,6 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/util/concurrency/thread_pool.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/sessions_collection_config_server.cpp b/src/mongo/db/sessions_collection_config_server.cpp index 4faa2afdcef..5d5f0153c7b 100644 --- a/src/mongo/db/sessions_collection_config_server.cpp +++ b/src/mongo/db/sessions_collection_config_server.cpp @@ -44,7 +44,6 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/shard_collection_gen.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/snapshot_window_util.cpp b/src/mongo/db/snapshot_window_util.cpp index fb9e7f4f9b2..cea17de679f 100644 --- a/src/mongo/db/snapshot_window_util.cpp +++ b/src/mongo/db/snapshot_window_util.cpp @@ -42,7 +42,6 @@ #include "mongo/platform/mutex.h" #include "mongo/util/concurrency/with_lock.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/sorter/sorter_test.cpp b/src/mongo/db/sorter/sorter_test.cpp index ebfd7cf605e..045735f74b3 100644 --- a/src/mongo/db/sorter/sorter_test.cpp +++ b/src/mongo/db/sorter/sorter_test.cpp @@ -47,7 +47,6 @@ #include "mongo/util/str.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include namespace mongo { diff --git a/src/mongo/db/startup_warnings_common.cpp b/src/mongo/db/startup_warnings_common.cpp index e04df02e5b2..47dc6991b2e 100644 --- a/src/mongo/db/startup_warnings_common.cpp +++ b/src/mongo/db/startup_warnings_common.cpp @@ -40,7 +40,6 @@ #include "mongo/config.h" #include "mongo/db/server_options.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/net/ssl_options.h" #include "mongo/util/processinfo.h" #include "mongo/util/version.h" diff --git a/src/mongo/db/startup_warnings_mongod.cpp b/src/mongo/db/startup_warnings_mongod.cpp index b7b8e5fc067..a3962966920 100644 --- a/src/mongo/db/startup_warnings_mongod.cpp +++ b/src/mongo/db/startup_warnings_mongod.cpp @@ -44,7 +44,6 @@ #include "mongo/db/startup_warnings_common.h" #include "mongo/db/storage/storage_options.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/processinfo.h" #include "mongo/util/str.h" #include "mongo/util/version.h" diff --git a/src/mongo/db/stats/counters.cpp b/src/mongo/db/stats/counters.cpp index f4ee4c71676..f9fd472eebe 100644 --- a/src/mongo/db/stats/counters.cpp +++ b/src/mongo/db/stats/counters.cpp @@ -36,7 +36,6 @@ #include "mongo/client/authenticate.h" #include "mongo/db/jsobj.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/stats/top.cpp b/src/mongo/db/stats/top.cpp index 1cba425396c..f8434261b23 100644 --- a/src/mongo/db/stats/top.cpp +++ b/src/mongo/db/stats/top.cpp @@ -35,7 +35,6 @@ #include "mongo/db/jsobj.h" #include "mongo/db/service_context.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/storage/biggie/biggie_record_store.cpp b/src/mongo/db/storage/biggie/biggie_record_store.cpp index 05d325f7bb2..70a5dee17d2 100644 --- a/src/mongo/db/storage/biggie/biggie_record_store.cpp +++ b/src/mongo/db/storage/biggie/biggie_record_store.cpp @@ -46,7 +46,6 @@ #include "mongo/db/storage/oplog_hack.h" #include "mongo/db/storage/write_unit_of_work.h" #include "mongo/util/hex.h" -#include "mongo/util/log.h" namespace mongo { namespace biggie { diff --git a/src/mongo/db/storage/biggie/biggie_recovery_unit.cpp b/src/mongo/db/storage/biggie/biggie_recovery_unit.cpp index 08e487fb603..f26ba7c6d95 100644 --- a/src/mongo/db/storage/biggie/biggie_recovery_unit.cpp +++ b/src/mongo/db/storage/biggie/biggie_recovery_unit.cpp @@ -35,7 +35,6 @@ #include "mongo/db/concurrency/write_conflict_exception.h" #include "mongo/db/storage/biggie/biggie_recovery_unit.h" -#include "mongo/util/log.h" namespace mongo { namespace biggie { diff --git a/src/mongo/db/storage/durable_catalog_impl.cpp b/src/mongo/db/storage/durable_catalog_impl.cpp index a4f8c2f4681..349cd7ced5a 100644 --- a/src/mongo/db/storage/durable_catalog_impl.cpp +++ b/src/mongo/db/storage/durable_catalog_impl.cpp @@ -52,7 +52,6 @@ #include "mongo/logv2/log.h" #include "mongo/platform/bits.h" #include "mongo/platform/random.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.cpp b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.cpp index 6760f71a89c..cda69867f97 100644 --- a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.cpp +++ b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.cpp @@ -39,7 +39,6 @@ #include "mongo/db/storage/oplog_hack.h" #include "mongo/db/storage/recovery_unit.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/unowned_ptr.h" diff --git a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_recovery_unit.cpp b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_recovery_unit.cpp index 05f665e90de..22cea51f686 100644 --- a/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_recovery_unit.cpp +++ b/src/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_recovery_unit.cpp @@ -35,7 +35,6 @@ #include "mongo/db/storage/sorted_data_interface.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/storage/flow_control.cpp b/src/mongo/db/storage/flow_control.cpp index 4e0c957fda6..f1d16c9bf76 100644 --- a/src/mongo/db/storage/flow_control.cpp +++ b/src/mongo/db/storage/flow_control.cpp @@ -47,7 +47,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/background.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/storage/key_string.cpp b/src/mongo/db/storage/key_string.cpp index b5acb1e77c6..aa783837eb0 100644 --- a/src/mongo/db/storage/key_string.cpp +++ b/src/mongo/db/storage/key_string.cpp @@ -43,7 +43,6 @@ #include "mongo/platform/strnlen.h" #include "mongo/util/decimal_counter.h" #include "mongo/util/hex.h" -#include "mongo/util/log.h" #define keyStringAssert(msgid, msg, expr) \ uassert(msgid, str::stream() << "KeyString format error: " << msg, expr) diff --git a/src/mongo/db/storage/key_string_bm.cpp b/src/mongo/db/storage/key_string_bm.cpp index 0891cc2b178..682f005f967 100644 --- a/src/mongo/db/storage/key_string_bm.cpp +++ b/src/mongo/db/storage/key_string_bm.cpp @@ -38,7 +38,6 @@ #include "mongo/db/storage/key_string.h" #include "mongo/platform/decimal128.h" #include "mongo/util/bufreader.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/storage/key_string_test.cpp b/src/mongo/db/storage/key_string_test.cpp index f9489633c6b..96caa8c8150 100644 --- a/src/mongo/db/storage/key_string_test.cpp +++ b/src/mongo/db/storage/key_string_test.cpp @@ -54,7 +54,6 @@ #include "mongo/unittest/death_test.h" #include "mongo/unittest/unittest.h" #include "mongo/util/hex.h" -#include "mongo/util/log.h" #include "mongo/util/timer.h" using std::string; 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 4e8927b2017..08d8e2ec8a6 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 @@ -38,7 +38,6 @@ #include "mongo/db/concurrency/d_concurrency.h" #include "mongo/db/storage/write_unit_of_work.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/storage/oplog_cap_maintainer_thread.cpp b/src/mongo/db/storage/oplog_cap_maintainer_thread.cpp index 88792e3709b..123d5ca7941 100644 --- a/src/mongo/db/storage/oplog_cap_maintainer_thread.cpp +++ b/src/mongo/db/storage/oplog_cap_maintainer_thread.cpp @@ -50,7 +50,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/db/storage/recovery_unit.cpp b/src/mongo/db/storage/recovery_unit.cpp index 35d605a5cdc..963efa781a6 100644 --- a/src/mongo/db/storage/recovery_unit.cpp +++ b/src/mongo/db/storage/recovery_unit.cpp @@ -33,7 +33,6 @@ #include "mongo/db/storage/recovery_unit.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/storage/remove_saver.cpp b/src/mongo/db/storage/remove_saver.cpp index 65d30c49518..73001e7d5d9 100644 --- a/src/mongo/db/storage/remove_saver.cpp +++ b/src/mongo/db/storage/remove_saver.cpp @@ -41,7 +41,6 @@ #include "mongo/db/storage/storage_options.h" #include "mongo/logv2/log.h" #include "mongo/util/errno_util.h" -#include "mongo/util/log.h" using std::ios_base; diff --git a/src/mongo/db/storage/storage_engine_init.cpp b/src/mongo/db/storage/storage_engine_init.cpp index ab3e8e9b032..a461a9e6d9b 100644 --- a/src/mongo/db/storage/storage_engine_init.cpp +++ b/src/mongo/db/storage/storage_engine_init.cpp @@ -47,7 +47,6 @@ #include "mongo/db/unclean_shutdown.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { 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 aba21904fa5..06dc3212c89 100644 --- a/src/mongo/db/storage/storage_engine_lock_file_posix.cpp +++ b/src/mongo/db/storage/storage_engine_lock_file_posix.cpp @@ -43,7 +43,6 @@ #include #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { 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 e6a152b4262..d985531b34e 100644 --- a/src/mongo/db/storage/storage_engine_lock_file_windows.cpp +++ b/src/mongo/db/storage/storage_engine_lock_file_windows.cpp @@ -39,7 +39,6 @@ #include #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/text.h" diff --git a/src/mongo/db/storage/storage_engine_metadata.cpp b/src/mongo/db/storage/storage_engine_metadata.cpp index f02288a1edd..9b0ce99d8ad 100644 --- a/src/mongo/db/storage/storage_engine_metadata.cpp +++ b/src/mongo/db/storage/storage_engine_metadata.cpp @@ -55,7 +55,6 @@ #include "mongo/rpc/object_check.h" #include "mongo/util/assert_util.h" #include "mongo/util/file.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/storage/storage_file_util.cpp b/src/mongo/db/storage/storage_file_util.cpp index 2a457ccf3a5..7f99cf0bbba 100644 --- a/src/mongo/db/storage/storage_file_util.cpp +++ b/src/mongo/db/storage/storage_file_util.cpp @@ -44,7 +44,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/file.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/storage/storage_repair_observer.cpp b/src/mongo/db/storage/storage_repair_observer.cpp index c5506aac4a4..82a8d6f401d 100644 --- a/src/mongo/db/storage/storage_repair_observer.cpp +++ b/src/mongo/db/storage/storage_repair_observer.cpp @@ -51,7 +51,6 @@ #include "mongo/db/storage/storage_options.h" #include "mongo/logv2/log.h" #include "mongo/util/file.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/storage/storage_repair_observer_test.cpp b/src/mongo/db/storage/storage_repair_observer_test.cpp index fa653febf9b..f81f36207f3 100644 --- a/src/mongo/db/storage/storage_repair_observer_test.cpp +++ b/src/mongo/db/storage/storage_repair_observer_test.cpp @@ -42,7 +42,6 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/death_test.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/db/storage/storage_unittest_debug_util.cpp b/src/mongo/db/storage/storage_unittest_debug_util.cpp index 0a5ccaa8b96..2c0d9243515 100644 --- a/src/mongo/db/storage/storage_unittest_debug_util.cpp +++ b/src/mongo/db/storage/storage_unittest_debug_util.cpp @@ -37,7 +37,6 @@ #include "mongo/db/index/index_access_method.h" #include "mongo/db/storage/key_string.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { 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 dd3396770bf..0c66453a188 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_begin_transaction_block.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_begin_transaction_block.cpp @@ -38,7 +38,6 @@ #include "mongo/db/storage/wiredtiger/wiredtiger_util.h" #include "mongo/util/errno_util.h" -#include "mongo/util/log.h" namespace mongo { using namespace fmt::literals; diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_cursor.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_cursor.cpp index 1008ad1b460..61107a588ea 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_cursor.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_cursor.cpp @@ -36,7 +36,6 @@ #include "mongo/db/storage/recovery_unit.h" #include "mongo/db/storage/wiredtiger/wiredtiger_util.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_global_options.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_global_options.cpp index d4b4a497bb9..d9020bd56bf 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_global_options.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_global_options.cpp @@ -34,7 +34,6 @@ #include "mongo/db/storage/wiredtiger/wiredtiger_global_options.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace moe = mongo::optionenvironment; diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_init.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_init.cpp index da0e63a957a..e9469d19570 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_init.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_init.cpp @@ -52,7 +52,6 @@ #include "mongo/db/storage/wiredtiger/wiredtiger_server_status.h" #include "mongo/db/storage/wiredtiger/wiredtiger_util.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/processinfo.h" #if __has_feature(address_sanitizer) 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 0879d6e8a1e..35565f41cee 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine_test.cpp @@ -51,7 +51,6 @@ #include "mongo/unittest/temp_dir.h" #include "mongo/unittest/unittest.h" #include "mongo/util/clock_source_mock.h" -#include "mongo/util/log.h" #include "mongo/util/log_global_settings.h" namespace mongo { diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp index dd4369428fc..cb20d2344f2 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.cpp @@ -40,7 +40,6 @@ #include "mongo/logv2/log.h" #include "mongo/platform/mutex.h" #include "mongo/util/concurrency/idle_thread_block.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.cpp index 44a90b320da..609889cbec6 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.cpp @@ -33,7 +33,6 @@ #include "mongo/db/storage/wiredtiger/wiredtiger_parameters_gen.h" #include "mongo/logger/parse_log_component_settings.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_prepare_conflict.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_prepare_conflict.cpp index ddd979a5510..4931a715262 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_prepare_conflict.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_prepare_conflict.cpp @@ -35,7 +35,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp index 208b426853c..173fb05f7b6 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_session_cache.cpp @@ -45,7 +45,6 @@ #include "mongo/db/storage/wiredtiger/wiredtiger_util.h" #include "mongo/logv2/log.h" #include "mongo/stdx/thread.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_size_storer.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_size_storer.cpp index 64a79fbc05c..cafb0104a20 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_size_storer.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_size_storer.cpp @@ -43,7 +43,6 @@ #include "mongo/db/storage/wiredtiger/wiredtiger_size_storer.h" #include "mongo/db/storage/wiredtiger/wiredtiger_util.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_snapshot_manager.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_snapshot_manager.cpp index d7598300171..ae91ac70994 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_snapshot_manager.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_snapshot_manager.cpp @@ -38,7 +38,6 @@ #include "mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h" #include "mongo/db/storage/wiredtiger/wiredtiger_util.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp index 8b72cbf94a0..5efe84a2dc3 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp @@ -44,7 +44,6 @@ #include "mongo/db/storage/wiredtiger/wiredtiger_session_cache.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/processinfo.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" diff --git a/src/mongo/db/system_index.cpp b/src/mongo/db/system_index.cpp index 45fa2c2c457..ad31f6bd2bc 100644 --- a/src/mongo/db/system_index.cpp +++ b/src/mongo/db/system_index.cpp @@ -48,7 +48,6 @@ #include "mongo/db/storage/storage_options.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" using namespace std::chrono_literals; diff --git a/src/mongo/db/ttl.cpp b/src/mongo/db/ttl.cpp index d3668ab3dd6..3dc621bb092 100644 --- a/src/mongo/db/ttl.cpp +++ b/src/mongo/db/ttl.cpp @@ -58,7 +58,6 @@ #include "mongo/util/background.h" #include "mongo/util/concurrency/idle_thread_block.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/views/durable_view_catalog.cpp b/src/mongo/db/views/durable_view_catalog.cpp index 174cbc37568..4cefc985a1e 100644 --- a/src/mongo/db/views/durable_view_catalog.cpp +++ b/src/mongo/db/views/durable_view_catalog.cpp @@ -48,7 +48,6 @@ #include "mongo/logv2/log.h" #include "mongo/stdx/unordered_set.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/string_map.h" namespace mongo { diff --git a/src/mongo/db/views/view_catalog.cpp b/src/mongo/db/views/view_catalog.cpp index ca81e4c5ac8..9481a83c400 100644 --- a/src/mongo/db/views/view_catalog.cpp +++ b/src/mongo/db/views/view_catalog.cpp @@ -57,7 +57,6 @@ #include "mongo/db/views/view_graph.h" #include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/write_concern.cpp b/src/mongo/db/write_concern.cpp index 31c9a47d489..5464e3f2a28 100644 --- a/src/mongo/db/write_concern.cpp +++ b/src/mongo/db/write_concern.cpp @@ -50,7 +50,6 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/protocol.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/dbtests/framework.cpp b/src/mongo/dbtests/framework.cpp index 170e66baea7..d16101b7fc0 100644 --- a/src/mongo/dbtests/framework.cpp +++ b/src/mongo/dbtests/framework.cpp @@ -57,7 +57,6 @@ #include "mongo/scripting/engine.h" #include "mongo/util/assert_util.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" #include "mongo/util/periodic_runner_factory.h" #include "mongo/util/scopeguard.h" #include "mongo/util/version.h" diff --git a/src/mongo/dbtests/jsobjtests.cpp b/src/mongo/dbtests/jsobjtests.cpp index 5124e1dee45..091a950c1bb 100644 --- a/src/mongo/dbtests/jsobjtests.cpp +++ b/src/mongo/dbtests/jsobjtests.cpp @@ -50,7 +50,6 @@ #include "mongo/platform/decimal128.h" #include "mongo/util/allocator.h" #include "mongo/util/embedded_builder.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/timer.h" diff --git a/src/mongo/dbtests/jsontests.cpp b/src/mongo/dbtests/jsontests.cpp index 926e65db9c8..5e3819808d2 100644 --- a/src/mongo/dbtests/jsontests.cpp +++ b/src/mongo/dbtests/jsontests.cpp @@ -48,7 +48,6 @@ #include "mongo/logv2/log.h" #include "mongo/platform/decimal128.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace { diff --git a/src/mongo/dbtests/repltests.cpp b/src/mongo/dbtests/repltests.cpp index c3503d2721f..bdb122a7efb 100644 --- a/src/mongo/dbtests/repltests.cpp +++ b/src/mongo/dbtests/repltests.cpp @@ -50,7 +50,6 @@ #include "mongo/logger/logger.h" #include "mongo/logv2/log.h" #include "mongo/transport/transport_layer_asio.h" -#include "mongo/util/log.h" using namespace mongo::repl; diff --git a/src/mongo/dbtests/storage_timestamp_tests.cpp b/src/mongo/dbtests/storage_timestamp_tests.cpp index 50061a85861..6e3090feeac 100644 --- a/src/mongo/dbtests/storage_timestamp_tests.cpp +++ b/src/mongo/dbtests/storage_timestamp_tests.cpp @@ -86,7 +86,6 @@ #include "mongo/logv2/log.h" #include "mongo/stdx/future.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" #include "mongo/util/stacktrace.h" namespace mongo { diff --git a/src/mongo/dbtests/threadedtests.cpp b/src/mongo/dbtests/threadedtests.cpp index f06ba1a00ea..6afeb2283a9 100644 --- a/src/mongo/dbtests/threadedtests.cpp +++ b/src/mongo/dbtests/threadedtests.cpp @@ -44,7 +44,6 @@ #include "mongo/stdx/thread.h" #include "mongo/util/concurrency/thread_pool.h" #include "mongo/util/concurrency/ticketholder.h" -#include "mongo/util/log.h" #include "mongo/util/timer.h" namespace ThreadedTests { diff --git a/src/mongo/dbtests/wildcard_multikey_persistence_test.cpp b/src/mongo/dbtests/wildcard_multikey_persistence_test.cpp index dce7de25165..a0b079255d8 100644 --- a/src/mongo/dbtests/wildcard_multikey_persistence_test.cpp +++ b/src/mongo/dbtests/wildcard_multikey_persistence_test.cpp @@ -38,7 +38,6 @@ #include "mongo/db/storage/sorted_data_interface.h" #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/embedded/index_builds_coordinator_embedded.cpp b/src/mongo/embedded/index_builds_coordinator_embedded.cpp index 0a69315e760..966762b0308 100644 --- a/src/mongo/embedded/index_builds_coordinator_embedded.cpp +++ b/src/mongo/embedded/index_builds_coordinator_embedded.cpp @@ -36,7 +36,6 @@ #include "mongo/db/catalog/collection_catalog.h" #include "mongo/db/operation_context.h" #include "mongo/db/service_context.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/embedded/mongoc_embedded/mongoc_embedded_test.cpp b/src/mongo/embedded/mongoc_embedded/mongoc_embedded_test.cpp index 2d3e87fae02..4f784575648 100644 --- a/src/mongo/embedded/mongoc_embedded/mongoc_embedded_test.cpp +++ b/src/mongo/embedded/mongoc_embedded/mongoc_embedded_test.cpp @@ -46,7 +46,6 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/temp_dir.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" #include "mongo/util/options_parser/environment.h" #include "mongo/util/options_parser/option_section.h" #include "mongo/util/options_parser/options_parser.h" diff --git a/src/mongo/executor/connection_pool_tl.cpp b/src/mongo/executor/connection_pool_tl.cpp index f1e48ee38a9..17d8d9c852e 100644 --- a/src/mongo/executor/connection_pool_tl.cpp +++ b/src/mongo/executor/connection_pool_tl.cpp @@ -36,7 +36,6 @@ #include "mongo/client/authenticate.h" #include "mongo/db/auth/authorization_manager.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace executor { diff --git a/src/mongo/executor/egress_tag_closer_manager.cpp b/src/mongo/executor/egress_tag_closer_manager.cpp index 64c0f0493b8..3d1a82ce618 100644 --- a/src/mongo/executor/egress_tag_closer_manager.cpp +++ b/src/mongo/executor/egress_tag_closer_manager.cpp @@ -33,7 +33,6 @@ #include "mongo/executor/egress_tag_closer_manager.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" diff --git a/src/mongo/executor/network_interface_integration_fixture.cpp b/src/mongo/executor/network_interface_integration_fixture.cpp index 6440f3eccf3..c51288ffcac 100644 --- a/src/mongo/executor/network_interface_integration_fixture.cpp +++ b/src/mongo/executor/network_interface_integration_fixture.cpp @@ -43,7 +43,6 @@ #include "mongo/stdx/future.h" #include "mongo/unittest/integration_test.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" 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 6838a4dc51c..6518fdf73d6 100644 --- a/src/mongo/executor/network_interface_integration_test.cpp +++ b/src/mongo/executor/network_interface_integration_test.cpp @@ -51,7 +51,6 @@ #include "mongo/unittest/integration_test.h" #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/executor/network_interface_mock.cpp b/src/mongo/executor/network_interface_mock.cpp index 0d329a64c1c..451f786042b 100644 --- a/src/mongo/executor/network_interface_mock.cpp +++ b/src/mongo/executor/network_interface_mock.cpp @@ -40,7 +40,6 @@ #include "mongo/executor/connection_pool_stats.h" #include "mongo/executor/network_connection_hook.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/time_support.h" diff --git a/src/mongo/executor/network_interface_perf_test.cpp b/src/mongo/executor/network_interface_perf_test.cpp index 3fc2eaf95e1..dbfab831896 100644 --- a/src/mongo/executor/network_interface_perf_test.cpp +++ b/src/mongo/executor/network_interface_perf_test.cpp @@ -47,7 +47,6 @@ #include "mongo/unittest/integration_test.h" #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/scopeguard.h" #include "mongo/util/timer.h" diff --git a/src/mongo/executor/network_interface_thread_pool.cpp b/src/mongo/executor/network_interface_thread_pool.cpp index e275c5fdff7..65abdf0abc2 100644 --- a/src/mongo/executor/network_interface_thread_pool.cpp +++ b/src/mongo/executor/network_interface_thread_pool.cpp @@ -36,7 +36,6 @@ #include "mongo/executor/network_interface.h" #include "mongo/logv2/log.h" #include "mongo/util/destructor_guard.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/executor/network_interface_tl.cpp b/src/mongo/executor/network_interface_tl.cpp index 0bb2d3bb539..00920d6aa2e 100644 --- a/src/mongo/executor/network_interface_tl.cpp +++ b/src/mongo/executor/network_interface_tl.cpp @@ -40,7 +40,6 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/transport/transport_layer_manager.h" #include "mongo/util/concurrency/idle_thread_block.h" -#include "mongo/util/log.h" #include "mongo/util/net/socket_utils.h" namespace mongo { @@ -705,7 +704,10 @@ Status NetworkInterfaceTL::startExhaustCommand(const TaskExecutor::CallbackHandl return {ErrorCodes::ShutdownInProgress, "NetworkInterface shutdown in progress"}; } - LOG(kDiagnosticLogLevel) << "startCommand: " << redact(request.toString()); + LOGV2_DEBUG(23909, + logSeverityV1toV2(kDiagnosticLogLevel).toInt(), + "startCommand: {request}", + "request"_attr = redact(request.toString())); if (_metadataHook) { BSONObjBuilder newMetadata(std::move(request.metadata)); diff --git a/src/mongo/executor/task_executor_test_common.cpp b/src/mongo/executor/task_executor_test_common.cpp index c3f31005a65..74966b97c3c 100644 --- a/src/mongo/executor/task_executor_test_common.cpp +++ b/src/mongo/executor/task_executor_test_common.cpp @@ -40,11 +40,11 @@ #include "mongo/executor/network_interface_mock.h" #include "mongo/executor/task_executor.h" #include "mongo/executor/task_executor_test_fixture.h" +#include "mongo/logv2/log.h" #include "mongo/stdx/thread.h" #include "mongo/stdx/unordered_map.h" #include "mongo/unittest/unittest.h" #include "mongo/util/clock_source_mock.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { @@ -85,7 +85,9 @@ public: CetRegistrationAgent(const std::string& name, ExecutorTestCaseFactory makeTest) { auto& entry = executorTestCaseRegistry()[name]; if (entry) { - severe() << "Multiple attempts to register ExecutorTest named " << name; + LOGV2_FATAL(23924, + "Multiple attempts to register ExecutorTest named {name}", + "name"_attr = name); fassertFailed(28713); } entry = std::move(makeTest); diff --git a/src/mongo/executor/thread_pool_mock.cpp b/src/mongo/executor/thread_pool_mock.cpp index 5f2255af995..e30e375a740 100644 --- a/src/mongo/executor/thread_pool_mock.cpp +++ b/src/mongo/executor/thread_pool_mock.cpp @@ -35,7 +35,6 @@ #include "mongo/executor/network_interface_mock.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" 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 9646de7e480..16391afb13b 100644 --- a/src/mongo/executor/thread_pool_task_executor.cpp +++ b/src/mongo/executor/thread_pool_task_executor.cpp @@ -47,7 +47,6 @@ #include "mongo/transport/baton.h" #include "mongo/util/concurrency/thread_pool_interface.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/idl/config_option_test.cpp b/src/mongo/idl/config_option_test.cpp index e3e8b8782df..42ed091adbf 100644 --- a/src/mongo/idl/config_option_test.cpp +++ b/src/mongo/idl/config_option_test.cpp @@ -35,7 +35,6 @@ #include "mongo/idl/config_option_test_gen.h" #include "mongo/unittest/unittest.h" #include "mongo/util/cmdline_utils/censor_cmdline_test.h" -#include "mongo/util/log.h" #include "mongo/util/options_parser/options_parser.h" #include "mongo/util/options_parser/startup_option_init.h" #include "mongo/util/options_parser/startup_options.h" diff --git a/src/mongo/idl/server_parameter.cpp b/src/mongo/idl/server_parameter.cpp index 14b7afb3456..021f9bfdbdf 100644 --- a/src/mongo/idl/server_parameter.cpp +++ b/src/mongo/idl/server_parameter.cpp @@ -32,7 +32,6 @@ #include "mongo/idl/server_parameter.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { using SPT = ServerParameterType; diff --git a/src/mongo/logger/parse_log_component_settings.cpp b/src/mongo/logger/parse_log_component_settings.cpp index 1982587e130..66e9e17a1ea 100644 --- a/src/mongo/logger/parse_log_component_settings.cpp +++ b/src/mongo/logger/parse_log_component_settings.cpp @@ -40,7 +40,6 @@ #include "mongo/bson/bsontypes.h" #include "mongo/logger/log_component.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/platform/decimal128_bson_test.cpp b/src/mongo/platform/decimal128_bson_test.cpp index 6f0313f1d12..43981a9ff90 100644 --- a/src/mongo/platform/decimal128_bson_test.cpp +++ b/src/mongo/platform/decimal128_bson_test.cpp @@ -46,7 +46,6 @@ #include "mongo/platform/decimal128.h" #include "mongo/unittest/unittest.h" #include "mongo/util/hex.h" -#include "mongo/util/log.h" namespace { std::string initTestData(); diff --git a/src/mongo/platform/random.cpp b/src/mongo/platform/random.cpp index fafb8f9d8ea..eaf1b8477e9 100644 --- a/src/mongo/platform/random.cpp +++ b/src/mongo/platform/random.cpp @@ -53,7 +53,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #ifdef _WIN32 #define SECURE_RANDOM_BCRYPT diff --git a/src/mongo/platform/random_test.cpp b/src/mongo/platform/random_test.cpp index f4bf565d700..54e9133a084 100644 --- a/src/mongo/platform/random_test.cpp +++ b/src/mongo/platform/random_test.cpp @@ -36,7 +36,6 @@ #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/platform/shared_library_posix.cpp b/src/mongo/platform/shared_library_posix.cpp index ee7e1eca829..eb8cb98d84e 100644 --- a/src/mongo/platform/shared_library_posix.cpp +++ b/src/mongo/platform/shared_library_posix.cpp @@ -38,7 +38,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/platform/shared_library_windows.cpp b/src/mongo/platform/shared_library_windows.cpp index 9d9a261de59..a8698499a1b 100644 --- a/src/mongo/platform/shared_library_windows.cpp +++ b/src/mongo/platform/shared_library_windows.cpp @@ -36,7 +36,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/text.h" diff --git a/src/mongo/platform/source_location_test.cpp b/src/mongo/platform/source_location_test.cpp index 5ba247fa807..94920636050 100644 --- a/src/mongo/platform/source_location_test.cpp +++ b/src/mongo/platform/source_location_test.cpp @@ -33,7 +33,6 @@ #include "mongo/logv2/log.h" #include "mongo/platform/source_location_test.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/rpc/metadata/client_metadata.cpp b/src/mongo/rpc/metadata/client_metadata.cpp index 455df2abee1..948f292ebc1 100644 --- a/src/mongo/rpc/metadata/client_metadata.cpp +++ b/src/mongo/rpc/metadata/client_metadata.cpp @@ -43,7 +43,6 @@ #include "mongo/db/operation_context.h" #include "mongo/logv2/log.h" #include "mongo/s/is_mongos.h" -#include "mongo/util/log.h" #include "mongo/util/processinfo.h" #include "mongo/util/str.h" diff --git a/src/mongo/rpc/metadata/client_metadata_test.cpp b/src/mongo/rpc/metadata/client_metadata_test.cpp index be9b666d222..c07729d3f04 100644 --- a/src/mongo/rpc/metadata/client_metadata_test.cpp +++ b/src/mongo/rpc/metadata/client_metadata_test.cpp @@ -40,7 +40,6 @@ #include "mongo/bson/bsonobjbuilder.h" #include "mongo/s/is_mongos.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/rpc/metadata/logical_time_metadata_test.cpp b/src/mongo/rpc/metadata/logical_time_metadata_test.cpp index a3553a1db6c..7684fdb3879 100644 --- a/src/mongo/rpc/metadata/logical_time_metadata_test.cpp +++ b/src/mongo/rpc/metadata/logical_time_metadata_test.cpp @@ -36,7 +36,6 @@ #include "mongo/rpc/metadata/logical_time_metadata.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { namespace rpc { diff --git a/src/mongo/rpc/op_msg.cpp b/src/mongo/rpc/op_msg.cpp index b20e269283b..0ca4f491014 100644 --- a/src/mongo/rpc/op_msg.cpp +++ b/src/mongo/rpc/op_msg.cpp @@ -43,7 +43,6 @@ #include "mongo/rpc/object_check.h" #include "mongo/util/bufreader.h" #include "mongo/util/hex.h" -#include "mongo/util/log.h" #ifdef MONGO_CONFIG_WIREDTIGER_ENABLED #include diff --git a/src/mongo/rpc/op_msg_integration_test.cpp b/src/mongo/rpc/op_msg_integration_test.cpp index 68dc5fa259b..c94922ad55d 100644 --- a/src/mongo/rpc/op_msg_integration_test.cpp +++ b/src/mongo/rpc/op_msg_integration_test.cpp @@ -40,7 +40,6 @@ #include "mongo/rpc/op_msg.h" #include "mongo/unittest/integration_test.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/s/catalog/replset_dist_lock_manager.cpp b/src/mongo/s/catalog/replset_dist_lock_manager.cpp index b3d4e678e28..3368f305815 100644 --- a/src/mongo/s/catalog/replset_dist_lock_manager.cpp +++ b/src/mongo/s/catalog/replset_dist_lock_manager.cpp @@ -49,7 +49,6 @@ #include "mongo/util/concurrency/idle_thread_block.h" #include "mongo/util/concurrency/thread_name.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/time_support.h" #include "mongo/util/timer.h" diff --git a/src/mongo/s/catalog/sharding_catalog_client_impl.cpp b/src/mongo/s/catalog/sharding_catalog_client_impl.cpp index 171fdbbf1e1..93065c91a75 100644 --- a/src/mongo/s/catalog/sharding_catalog_client_impl.cpp +++ b/src/mongo/s/catalog/sharding_catalog_client_impl.cpp @@ -70,7 +70,6 @@ #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/util/assert_util.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/str.h" #include "mongo/util/time_support.h" diff --git a/src/mongo/s/catalog/sharding_catalog_test.cpp b/src/mongo/s/catalog/sharding_catalog_test.cpp index 3f6e0decf83..c0c019db581 100644 --- a/src/mongo/s/catalog/sharding_catalog_test.cpp +++ b/src/mongo/s/catalog/sharding_catalog_test.cpp @@ -57,7 +57,6 @@ #include "mongo/s/sharding_router_test_fixture.h" #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/stdx/future.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { 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 1851a41ef00..022bfa43881 100644 --- a/src/mongo/s/catalog/sharding_catalog_write_retry_test.cpp +++ b/src/mongo/s/catalog/sharding_catalog_write_retry_test.cpp @@ -57,7 +57,6 @@ #include "mongo/s/sharding_router_test_fixture.h" #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/stdx/future.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/s/chunk_manager.cpp b/src/mongo/s/chunk_manager.cpp index a8af892ff28..8fc7d740f30 100644 --- a/src/mongo/s/chunk_manager.cpp +++ b/src/mongo/s/chunk_manager.cpp @@ -44,7 +44,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/chunk_writes_tracker.h" #include "mongo/s/shard_invalidated_for_targeting_exception.h" -#include "mongo/util/log.h" 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 822ad25aa9c..fa30a2795d5 100644 --- a/src/mongo/s/chunk_manager_index_bounds_test.cpp +++ b/src/mongo/s/chunk_manager_index_bounds_test.cpp @@ -42,7 +42,6 @@ #include "mongo/s/shard_key_pattern.h" #include "mongo/s/sharding_router_test_fixture.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/s/chunk_manager_query_test.cpp b/src/mongo/s/chunk_manager_query_test.cpp index cece84d2d03..7b2d47561c7 100644 --- a/src/mongo/s/chunk_manager_query_test.cpp +++ b/src/mongo/s/chunk_manager_query_test.cpp @@ -36,7 +36,6 @@ #include "mongo/db/query/collation/collator_interface_mock.h" #include "mongo/s/catalog_cache_test_fixture.h" #include "mongo/s/chunk_manager.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/s/client/shard.cpp b/src/mongo/s/client/shard.cpp index f76216b1c4a..5aa8d72671d 100644 --- a/src/mongo/s/client/shard.cpp +++ b/src/mongo/s/client/shard.cpp @@ -39,7 +39,6 @@ #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/s/client/shard_connection.cpp b/src/mongo/s/client/shard_connection.cpp index 55bc10c5f5f..2a4b4e020a9 100644 --- a/src/mongo/s/client/shard_connection.cpp +++ b/src/mongo/s/client/shard_connection.cpp @@ -50,7 +50,6 @@ #include "mongo/util/concurrency/spin_lock.h" #include "mongo/util/exit.h" #include "mongo/util/hierarchical_acquisition.h" -#include "mongo/util/log.h" #include "mongo/util/stacktrace.h" namespace mongo { diff --git a/src/mongo/s/client/shard_factory.cpp b/src/mongo/s/client/shard_factory.cpp index 98fffbc034c..38083dfe374 100644 --- a/src/mongo/s/client/shard_factory.cpp +++ b/src/mongo/s/client/shard_factory.cpp @@ -40,7 +40,6 @@ #include "mongo/client/connection_string.h" #include "mongo/client/remote_command_targeter.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/s/client/shard_registry.cpp b/src/mongo/s/client/shard_registry.cpp index 66659121c5f..7bf3c59abe4 100644 --- a/src/mongo/s/client/shard_registry.cpp +++ b/src/mongo/s/client/shard_registry.cpp @@ -59,7 +59,6 @@ #include "mongo/s/client/shard_factory.h" #include "mongo/s/grid.h" #include "mongo/util/concurrency/with_lock.h" -#include "mongo/util/log.h" #include "mongo/util/map_util.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" diff --git a/src/mongo/s/client/sharding_connection_hook.cpp b/src/mongo/s/client/sharding_connection_hook.cpp index e55396f6347..93f3b6831eb 100644 --- a/src/mongo/s/client/sharding_connection_hook.cpp +++ b/src/mongo/s/client/sharding_connection_hook.cpp @@ -41,7 +41,6 @@ #include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/s/client/version_manager.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/s/cluster_commands_helpers.cpp b/src/mongo/s/cluster_commands_helpers.cpp index 2df30dd8d33..0f4ef277ce0 100644 --- a/src/mongo/s/cluster_commands_helpers.cpp +++ b/src/mongo/s/cluster_commands_helpers.cpp @@ -56,7 +56,6 @@ #include "mongo/s/shard_id.h" #include "mongo/s/stale_exception.h" #include "mongo/s/transaction_router.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/s/cluster_identity_loader_test.cpp b/src/mongo/s/cluster_identity_loader_test.cpp index a1083fc9350..507f6cc6fa6 100644 --- a/src/mongo/s/cluster_identity_loader_test.cpp +++ b/src/mongo/s/cluster_identity_loader_test.cpp @@ -47,7 +47,6 @@ #include "mongo/s/cluster_identity_loader.h" #include "mongo/s/sharding_router_test_fixture.h" #include "mongo/stdx/future.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/s/cluster_last_error_info_test.cpp b/src/mongo/s/cluster_last_error_info_test.cpp index 3822a3e913b..ba5731b1771 100644 --- a/src/mongo/s/cluster_last_error_info_test.cpp +++ b/src/mongo/s/cluster_last_error_info_test.cpp @@ -39,7 +39,6 @@ #include "mongo/s/cluster_last_error_info.h" #include "mongo/s/sharding_router_test_fixture.h" #include "mongo/stdx/future.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/s/commands/cluster_add_shard_cmd.cpp b/src/mongo/s/commands/cluster_add_shard_cmd.cpp index 66067b2c16c..395875a5511 100644 --- a/src/mongo/s/commands/cluster_add_shard_cmd.cpp +++ b/src/mongo/s/commands/cluster_add_shard_cmd.cpp @@ -35,7 +35,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/add_shard_request_type.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { 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 c3e6290efcd..8e0acd0adec 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 @@ -38,7 +38,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/add_shard_to_zone_request_type.h" -#include "mongo/util/log.h" 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 1cc17bf7ece..c2c64200dff 100644 --- a/src/mongo/s/commands/cluster_balancer_collection_status_cmd.cpp +++ b/src/mongo/s/commands/cluster_balancer_collection_status_cmd.cpp @@ -50,7 +50,6 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/balancer_collection_status_gen.h" -#include "mongo/util/log.h" 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 19cfde4a72c..9139850db2c 100644 --- a/src/mongo/s/commands/cluster_clear_jumbo_flag_cmd.cpp +++ b/src/mongo/s/commands/cluster_clear_jumbo_flag_cmd.cpp @@ -43,7 +43,6 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/clear_jumbo_flag_gen.h" -#include "mongo/util/log.h" 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 b6b78d452df..0271301fc2c 100644 --- a/src/mongo/s/commands/cluster_coll_stats_cmd.cpp +++ b/src/mongo/s/commands/cluster_coll_stats_cmd.cpp @@ -36,7 +36,6 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" 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 6bcfeac3521..a8c971b3e30 100644 --- a/src/mongo/s/commands/cluster_collection_mod_cmd.cpp +++ b/src/mongo/s/commands/cluster_collection_mod_cmd.cpp @@ -36,7 +36,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" 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 053b66d0786..15339f73ab8 100644 --- a/src/mongo/s/commands/cluster_command_test_fixture.cpp +++ b/src/mongo/s/commands/cluster_command_test_fixture.cpp @@ -43,7 +43,6 @@ #include "mongo/db/logical_time_validator.h" #include "mongo/s/cluster_last_error_info.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/tick_source_mock.h" namespace mongo { diff --git a/src/mongo/s/commands/cluster_create_indexes_cmd.cpp b/src/mongo/s/commands/cluster_create_indexes_cmd.cpp index 242e8699766..299ec9b5081 100644 --- a/src/mongo/s/commands/cluster_create_indexes_cmd.cpp +++ b/src/mongo/s/commands/cluster_create_indexes_cmd.cpp @@ -36,7 +36,6 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" 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 3b172589ffb..900061543ad 100644 --- a/src/mongo/s/commands/cluster_data_size_cmd.cpp +++ b/src/mongo/s/commands/cluster_data_size_cmd.cpp @@ -35,7 +35,6 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_delete_test.cpp b/src/mongo/s/commands/cluster_delete_test.cpp index 75ddd30f35c..a4a65fc73eb 100644 --- a/src/mongo/s/commands/cluster_delete_test.cpp +++ b/src/mongo/s/commands/cluster_delete_test.cpp @@ -32,7 +32,6 @@ #include "mongo/platform/basic.h" #include "mongo/s/commands/cluster_command_test_fixture.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_distinct_test.cpp b/src/mongo/s/commands/cluster_distinct_test.cpp index 4198cb17026..71f0e5badec 100644 --- a/src/mongo/s/commands/cluster_distinct_test.cpp +++ b/src/mongo/s/commands/cluster_distinct_test.cpp @@ -32,7 +32,6 @@ #include "mongo/platform/basic.h" #include "mongo/s/commands/cluster_command_test_fixture.h" -#include "mongo/util/log.h" 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 3de2be13cec..97e29270615 100644 --- a/src/mongo/s/commands/cluster_drop_database_cmd.cpp +++ b/src/mongo/s/commands/cluster_drop_database_cmd.cpp @@ -37,7 +37,6 @@ #include "mongo/s/catalog_cache.h" #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/s/commands/cluster_drop_indexes_cmd.cpp b/src/mongo/s/commands/cluster_drop_indexes_cmd.cpp index 55519ddda48..a1becdc4400 100644 --- a/src/mongo/s/commands/cluster_drop_indexes_cmd.cpp +++ b/src/mongo/s/commands/cluster_drop_indexes_cmd.cpp @@ -35,7 +35,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" 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 73e3891d86f..1864012157e 100644 --- a/src/mongo/s/commands/cluster_enable_sharding_cmd.cpp +++ b/src/mongo/s/commands/cluster_enable_sharding_cmd.cpp @@ -39,7 +39,6 @@ #include "mongo/s/catalog_cache.h" #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/s/commands/cluster_filemd5_cmd.cpp b/src/mongo/s/commands/cluster_filemd5_cmd.cpp index e17534b8618..ae19ff53b66 100644 --- a/src/mongo/s/commands/cluster_filemd5_cmd.cpp +++ b/src/mongo/s/commands/cluster_filemd5_cmd.cpp @@ -35,7 +35,6 @@ #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" 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 1a8a9970f5d..704288fe5fd 100644 --- a/src/mongo/s/commands/cluster_find_and_modify_test.cpp +++ b/src/mongo/s/commands/cluster_find_and_modify_test.cpp @@ -32,7 +32,6 @@ #include "mongo/platform/basic.h" #include "mongo/s/commands/cluster_command_test_fixture.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_get_last_error_cmd.cpp b/src/mongo/s/commands/cluster_get_last_error_cmd.cpp index cfc28fd3682..c066241f947 100644 --- a/src/mongo/s/commands/cluster_get_last_error_cmd.cpp +++ b/src/mongo/s/commands/cluster_get_last_error_cmd.cpp @@ -45,7 +45,6 @@ #include "mongo/s/grid.h" #include "mongo/s/multi_statement_transaction_requests_sender.h" #include "mongo/s/write_ops/batch_downconvert.h" -#include "mongo/util/log.h" 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 c4c5acaec63..e1878ffbac4 100644 --- a/src/mongo/s/commands/cluster_get_shard_version_cmd.cpp +++ b/src/mongo/s/commands/cluster_get_shard_version_cmd.cpp @@ -40,7 +40,6 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/database_version_gen.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_insert_test.cpp b/src/mongo/s/commands/cluster_insert_test.cpp index 2d5a47d64d7..a8f3ebd5f8e 100644 --- a/src/mongo/s/commands/cluster_insert_test.cpp +++ b/src/mongo/s/commands/cluster_insert_test.cpp @@ -33,7 +33,6 @@ #include "mongo/db/commands.h" #include "mongo/s/commands/cluster_command_test_fixture.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_is_master_cmd.cpp b/src/mongo/s/commands/cluster_is_master_cmd.cpp index 7432b5b6e33..203f5e2e3df 100644 --- a/src/mongo/s/commands/cluster_is_master_cmd.cpp +++ b/src/mongo/s/commands/cluster_is_master_cmd.cpp @@ -38,11 +38,11 @@ #include "mongo/db/operation_context.h" #include "mongo/db/ops/write_ops.h" #include "mongo/db/wire_version.h" +#include "mongo/logv2/log.h" #include "mongo/rpc/metadata/client_metadata.h" #include "mongo/rpc/metadata/client_metadata_ismaster.h" #include "mongo/rpc/topology_version_gen.h" #include "mongo/transport/message_compressor_manager.h" -#include "mongo/util/log.h" #include "mongo/util/map_util.h" #include "mongo/util/net/socket_utils.h" #include "mongo/util/version.h" @@ -139,7 +139,7 @@ public: uassertStatusOK(bsonExtractIntegerField(cmdObj, "maxAwaitTimeMS", &maxAwaitTimeMS)); uassert(51759, "maxAwaitTimeMS must be a non-negative integer", maxAwaitTimeMS >= 0); - LOG(3) << "Using maxAwaitTimeMS for awaitable isMaster protocol."; + LOGV2_DEBUG(23871, 3, "Using maxAwaitTimeMS for awaitable isMaster protocol."); if (clientTopologyVersion->getProcessId() == mongosTopologyVersion.getProcessId()) { uassert(51761, @@ -193,7 +193,7 @@ public: mongosTopologyVersion.serialize(&topologyVersionBuilder); if (opCtx->isExhaust()) { - LOG(3) << "Using exhaust for isMaster protocol"; + LOGV2_DEBUG(23872, 3, "Using exhaust for isMaster protocol"); uassert(51763, "An isMaster request with exhaust must specify 'maxAwaitTimeMS'", diff --git a/src/mongo/s/commands/cluster_kill_op.cpp b/src/mongo/s/commands/cluster_kill_op.cpp index 353b200dbf2..965833795aa 100644 --- a/src/mongo/s/commands/cluster_kill_op.cpp +++ b/src/mongo/s/commands/cluster_kill_op.cpp @@ -47,7 +47,6 @@ #include "mongo/s/client/shard.h" #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/s/commands/cluster_move_chunk_cmd.cpp b/src/mongo/s/commands/cluster_move_chunk_cmd.cpp index f237fe1760d..e2100c23e73 100644 --- a/src/mongo/s/commands/cluster_move_chunk_cmd.cpp +++ b/src/mongo/s/commands/cluster_move_chunk_cmd.cpp @@ -46,7 +46,6 @@ #include "mongo/s/config_server_client.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/migration_secondary_throttle_options.h" -#include "mongo/util/log.h" #include "mongo/util/timer.h" namespace mongo { diff --git a/src/mongo/s/commands/cluster_move_primary_cmd.cpp b/src/mongo/s/commands/cluster_move_primary_cmd.cpp index 248e117aa53..60fbd12f42e 100644 --- a/src/mongo/s/commands/cluster_move_primary_cmd.cpp +++ b/src/mongo/s/commands/cluster_move_primary_cmd.cpp @@ -44,7 +44,6 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/move_primary_gen.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" 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 15560de3866..527f9afaa07 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 @@ -37,7 +37,6 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/refine_collection_shard_key_gen.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" 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 f5b62a05311..b84975292e5 100644 --- a/src/mongo/s/commands/cluster_remove_shard_cmd.cpp +++ b/src/mongo/s/commands/cluster_remove_shard_cmd.cpp @@ -37,7 +37,6 @@ #include "mongo/s/client/shard.h" #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" 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 bc9caa4fa96..a96ffd2f5bb 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 @@ -42,7 +42,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/remove_shard_from_zone_request_type.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/s/commands/cluster_rwc_defaults_commands.cpp b/src/mongo/s/commands/cluster_rwc_defaults_commands.cpp index 44ff531a3a4..1064d8d0af1 100644 --- a/src/mongo/s/commands/cluster_rwc_defaults_commands.cpp +++ b/src/mongo/s/commands/cluster_rwc_defaults_commands.cpp @@ -38,7 +38,6 @@ #include "mongo/db/read_write_concern_defaults.h" #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" 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 6848eee5371..616347c5ef6 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 @@ -39,7 +39,6 @@ #include "mongo/db/commands/set_index_commit_quorum_gen.h" #include "mongo/logv2/log.h" #include "mongo/s/cluster_commands_helpers.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_shard_collection_cmd.cpp b/src/mongo/s/commands/cluster_shard_collection_cmd.cpp index b55e6a52e3f..758cce72abb 100644 --- a/src/mongo/s/commands/cluster_shard_collection_cmd.cpp +++ b/src/mongo/s/commands/cluster_shard_collection_cmd.cpp @@ -59,7 +59,6 @@ #include "mongo/s/grid.h" #include "mongo/s/request_types/migration_secondary_throttle_options.h" #include "mongo/s/request_types/shard_collection_gen.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/s/commands/cluster_split_cmd.cpp b/src/mongo/s/commands/cluster_split_cmd.cpp index 4a89095ea0f..bf5ea113f70 100644 --- a/src/mongo/s/commands/cluster_split_cmd.cpp +++ b/src/mongo/s/commands/cluster_split_cmd.cpp @@ -45,7 +45,6 @@ #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" #include "mongo/s/shard_util.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/s/commands/cluster_update_test.cpp b/src/mongo/s/commands/cluster_update_test.cpp index ba668b6701b..b6efc6aeebb 100644 --- a/src/mongo/s/commands/cluster_update_test.cpp +++ b/src/mongo/s/commands/cluster_update_test.cpp @@ -32,7 +32,6 @@ #include "mongo/platform/basic.h" #include "mongo/s/commands/cluster_command_test_fixture.h" -#include "mongo/util/log.h" 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 eff1d60446f..5f61480649c 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 @@ -43,7 +43,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/request_types/update_zone_key_range_request_type.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/s/commands/cluster_write_cmd.cpp b/src/mongo/s/commands/cluster_write_cmd.cpp index a2f335ee270..823360ac898 100644 --- a/src/mongo/s/commands/cluster_write_cmd.cpp +++ b/src/mongo/s/commands/cluster_write_cmd.cpp @@ -61,7 +61,6 @@ #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/s/write_ops/chunk_manager_targeter.h" #include "mongo/s/write_ops/cluster_write.h" -#include "mongo/util/log.h" #include "mongo/util/timer.h" namespace mongo { diff --git a/src/mongo/s/commands/commands_public.cpp b/src/mongo/s/commands/commands_public.cpp index 16f56cd9d24..ee7315b3a85 100644 --- a/src/mongo/s/commands/commands_public.cpp +++ b/src/mongo/s/commands/commands_public.cpp @@ -46,7 +46,6 @@ #include "mongo/s/grid.h" #include "mongo/s/query/store_possible_cursor.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/timer.h" namespace mongo { 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 e05cf60ffc5..2bf8776329f 100644 --- a/src/mongo/s/commands/document_shard_key_update_test.cpp +++ b/src/mongo/s/commands/document_shard_key_update_test.cpp @@ -37,7 +37,6 @@ #include "mongo/s/commands/document_shard_key_update_util.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { 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 f7c2c33bba0..4c91d1e77a7 100644 --- a/src/mongo/s/commands/document_shard_key_update_util.cpp +++ b/src/mongo/s/commands/document_shard_key_update_util.cpp @@ -39,7 +39,6 @@ #include "mongo/s/write_ops/batched_command_response.h" #include "mongo/s/write_ops/cluster_write.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/s/commands/flush_router_config_cmd.cpp b/src/mongo/s/commands/flush_router_config_cmd.cpp index e84e66cdfd7..3e5cc6aedda 100644 --- a/src/mongo/s/commands/flush_router_config_cmd.cpp +++ b/src/mongo/s/commands/flush_router_config_cmd.cpp @@ -35,7 +35,6 @@ #include "mongo/logv2/log.h" #include "mongo/s/grid.h" #include "mongo/s/is_mongos.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/s/commands/kill_sessions_remote.cpp b/src/mongo/s/commands/kill_sessions_remote.cpp index 57f1d015ce6..637dbb0c9b7 100644 --- a/src/mongo/s/commands/kill_sessions_remote.cpp +++ b/src/mongo/s/commands/kill_sessions_remote.cpp @@ -44,7 +44,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/query/cluster_cursor_manager.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/s/commands/strategy.cpp b/src/mongo/s/commands/strategy.cpp index 990ae16a972..75045a461f7 100644 --- a/src/mongo/s/commands/strategy.cpp +++ b/src/mongo/s/commands/strategy.cpp @@ -84,7 +84,6 @@ #include "mongo/s/stale_exception.h" #include "mongo/s/transaction_router.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" #include "mongo/util/timer.h" diff --git a/src/mongo/s/config_server_catalog_cache_loader.cpp b/src/mongo/s/config_server_catalog_cache_loader.cpp index 792a8e70489..7571cdc9f45 100644 --- a/src/mongo/s/config_server_catalog_cache_loader.cpp +++ b/src/mongo/s/config_server_catalog_cache_loader.cpp @@ -41,7 +41,6 @@ #include "mongo/s/database_version_helpers.h" #include "mongo/s/grid.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/s/grid.cpp b/src/mongo/s/grid.cpp index 86f6907931c..a20e0900c15 100644 --- a/src/mongo/s/grid.cpp +++ b/src/mongo/s/grid.cpp @@ -42,7 +42,6 @@ #include "mongo/s/catalog_cache.h" #include "mongo/s/client/shard_factory.h" #include "mongo/s/query/cluster_cursor_manager.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/s/query/async_results_merger.cpp b/src/mongo/s/query/async_results_merger.cpp index bff8b0902aa..4c2d86bd828 100644 --- a/src/mongo/s/query/async_results_merger.cpp +++ b/src/mongo/s/query/async_results_merger.cpp @@ -42,7 +42,6 @@ #include "mongo/executor/remote_command_request.h" #include "mongo/executor/remote_command_response.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/s/query/cluster_aggregate.cpp b/src/mongo/s/query/cluster_aggregate.cpp index a7a111cfc72..68dfa7b1730 100644 --- a/src/mongo/s/query/cluster_aggregate.cpp +++ b/src/mongo/s/query/cluster_aggregate.cpp @@ -76,7 +76,6 @@ #include "mongo/s/query/store_possible_cursor.h" #include "mongo/s/stale_exception.h" #include "mongo/s/transaction_router.h" -#include "mongo/util/log.h" #include "mongo/util/net/socket_utils.h" namespace mongo { diff --git a/src/mongo/s/query/cluster_aggregate_test.cpp b/src/mongo/s/query/cluster_aggregate_test.cpp index d48ba9f3d41..b4e485475d5 100644 --- a/src/mongo/s/query/cluster_aggregate_test.cpp +++ b/src/mongo/s/query/cluster_aggregate_test.cpp @@ -34,7 +34,6 @@ #include "mongo/db/query/cursor_response.h" #include "mongo/s/commands/cluster_command_test_fixture.h" #include "mongo/s/query/cluster_aggregate.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/s/query/cluster_aggregation_planner.cpp b/src/mongo/s/query/cluster_aggregation_planner.cpp index c3281cff249..9b1e26de749 100644 --- a/src/mongo/s/query/cluster_aggregation_planner.cpp +++ b/src/mongo/s/query/cluster_aggregation_planner.cpp @@ -57,7 +57,6 @@ #include "mongo/s/shard_id.h" #include "mongo/s/shard_key_pattern.h" #include "mongo/s/transaction_router.h" -#include "mongo/util/log.h" namespace mongo { namespace cluster_aggregation_planner { diff --git a/src/mongo/s/query/cluster_cursor_manager.cpp b/src/mongo/s/query/cluster_cursor_manager.cpp index 358bbfc4d18..3556d38f03d 100644 --- a/src/mongo/s/query/cluster_cursor_manager.cpp +++ b/src/mongo/s/query/cluster_cursor_manager.cpp @@ -40,7 +40,6 @@ #include "mongo/db/logical_session_cache.h" #include "mongo/logv2/log.h" #include "mongo/util/clock_source.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/s/query/cluster_find.cpp b/src/mongo/s/query/cluster_find.cpp index e06b79dcb6a..1cef2092ffc 100644 --- a/src/mongo/s/query/cluster_find.cpp +++ b/src/mongo/s/query/cluster_find.cpp @@ -66,7 +66,6 @@ #include "mongo/s/stale_exception.h" #include "mongo/s/transaction_router.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/s/query/establish_cursors.cpp b/src/mongo/s/query/establish_cursors.cpp index 2649343a241..4e0e0a465b0 100644 --- a/src/mongo/s/query/establish_cursors.cpp +++ b/src/mongo/s/query/establish_cursors.cpp @@ -44,7 +44,6 @@ #include "mongo/s/grid.h" #include "mongo/s/multi_statement_transaction_requests_sender.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/s/server.cpp b/src/mongo/s/server.cpp index cddd8e36849..8ce848998a7 100644 --- a/src/mongo/s/server.cpp +++ b/src/mongo/s/server.cpp @@ -108,7 +108,6 @@ #include "mongo/util/exit.h" #include "mongo/util/fast_clock_source_factory.h" #include "mongo/util/latch_analyzer.h" -#include "mongo/util/log.h" #include "mongo/util/net/ocsp/ocsp_manager.h" #include "mongo/util/net/socket_exception.h" #include "mongo/util/net/socket_utils.h" diff --git a/src/mongo/s/service_entry_point_mongos.cpp b/src/mongo/s/service_entry_point_mongos.cpp index f15dabf9bec..84fe595b841 100644 --- a/src/mongo/s/service_entry_point_mongos.cpp +++ b/src/mongo/s/service_entry_point_mongos.cpp @@ -45,7 +45,6 @@ #include "mongo/s/client/shard_connection.h" #include "mongo/s/cluster_last_error_info.h" #include "mongo/s/commands/strategy.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/s/shard_util.cpp b/src/mongo/s/shard_util.cpp index 68e9b9ad02d..862bbeeb1b5 100644 --- a/src/mongo/s/shard_util.cpp +++ b/src/mongo/s/shard_util.cpp @@ -42,7 +42,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/grid.h" #include "mongo/s/shard_key_pattern.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/s/sharding_egress_metadata_hook_for_mongos.cpp b/src/mongo/s/sharding_egress_metadata_hook_for_mongos.cpp index 88b75c67ae3..bfcc7e7d879 100644 --- a/src/mongo/s/sharding_egress_metadata_hook_for_mongos.cpp +++ b/src/mongo/s/sharding_egress_metadata_hook_for_mongos.cpp @@ -37,7 +37,6 @@ #include "mongo/rpc/metadata/sharding_metadata.h" #include "mongo/s/cluster_last_error_info.h" #include "mongo/s/grid.h" -#include "mongo/util/log.h" namespace mongo { namespace rpc { diff --git a/src/mongo/s/sharding_initialization.cpp b/src/mongo/s/sharding_initialization.cpp index 04bcabf11b5..eb6cdd80e79 100644 --- a/src/mongo/s/sharding_initialization.cpp +++ b/src/mongo/s/sharding_initialization.cpp @@ -76,7 +76,6 @@ #include "mongo/stdx/thread.h" #include "mongo/util/concurrency/thread_pool.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" #include "mongo/util/net/socket_utils.h" #include "mongo/util/str.h" diff --git a/src/mongo/s/sharding_task_executor.cpp b/src/mongo/s/sharding_task_executor.cpp index 5d3eb5243e9..c9c47f9c3f9 100644 --- a/src/mongo/s/sharding_task_executor.cpp +++ b/src/mongo/s/sharding_task_executor.cpp @@ -46,7 +46,6 @@ #include "mongo/s/grid.h" #include "mongo/s/is_mongos.h" #include "mongo/s/transaction_router.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/s/sharding_task_executor_pool_controller.cpp b/src/mongo/s/sharding_task_executor_pool_controller.cpp index e20a59e128b..c773823536c 100644 --- a/src/mongo/s/sharding_task_executor_pool_controller.cpp +++ b/src/mongo/s/sharding_task_executor_pool_controller.cpp @@ -33,7 +33,6 @@ #include "mongo/client/replica_set_monitor.h" #include "mongo/s/sharding_task_executor_pool_controller.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/s/sharding_uptime_reporter.cpp b/src/mongo/s/sharding_uptime_reporter.cpp index 72cb497c90d..90c3fa391af 100644 --- a/src/mongo/s/sharding_uptime_reporter.cpp +++ b/src/mongo/s/sharding_uptime_reporter.cpp @@ -42,7 +42,6 @@ #include "mongo/s/grid.h" #include "mongo/util/concurrency/idle_thread_block.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostname_canonicalization.h" #include "mongo/util/net/socket_utils.h" #include "mongo/util/str.h" diff --git a/src/mongo/s/write_ops/batch_write_exec.cpp b/src/mongo/s/write_ops/batch_write_exec.cpp index c81638ef82b..1b819aff668 100644 --- a/src/mongo/s/write_ops/batch_write_exec.cpp +++ b/src/mongo/s/write_ops/batch_write_exec.cpp @@ -48,7 +48,6 @@ #include "mongo/s/transaction_router.h" #include "mongo/s/write_ops/batch_write_op.h" #include "mongo/s/write_ops/write_error_detail.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/s/write_ops/chunk_manager_targeter.cpp b/src/mongo/s/write_ops/chunk_manager_targeter.cpp index 3d7012183dd..e0089ab7467 100644 --- a/src/mongo/s/write_ops/chunk_manager_targeter.cpp +++ b/src/mongo/s/write_ops/chunk_manager_targeter.cpp @@ -44,7 +44,6 @@ #include "mongo/s/database_version_helpers.h" #include "mongo/s/grid.h" #include "mongo/s/shard_key_pattern.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/s/write_ops/cluster_write.cpp b/src/mongo/s/write_ops/cluster_write.cpp index 18d4f4db353..5d544dcfd9d 100644 --- a/src/mongo/s/write_ops/cluster_write.cpp +++ b/src/mongo/s/write_ops/cluster_write.cpp @@ -49,7 +49,6 @@ #include "mongo/s/grid.h" #include "mongo/s/shard_util.h" #include "mongo/s/write_ops/chunk_manager_targeter.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/scripting/engine.cpp b/src/mongo/scripting/engine.cpp index fb18a034226..754a14067db 100644 --- a/src/mongo/scripting/engine.cpp +++ b/src/mongo/scripting/engine.cpp @@ -44,7 +44,6 @@ #include "mongo/scripting/dbdirectclient_factory.h" #include "mongo/util/fail_point.h" #include "mongo/util/file.h" -#include "mongo/util/log.h" #include "mongo/util/text.h" namespace mongo { diff --git a/src/mongo/scripting/mozjs/cursor_handle.cpp b/src/mongo/scripting/mozjs/cursor_handle.cpp index 80a1950d46d..d6d68f7c88d 100644 --- a/src/mongo/scripting/mozjs/cursor_handle.cpp +++ b/src/mongo/scripting/mozjs/cursor_handle.cpp @@ -37,7 +37,6 @@ #include "mongo/scripting/mozjs/implscope.h" #include "mongo/scripting/mozjs/scripting_util_gen.h" #include "mongo/scripting/mozjs/wrapconstrainedmethod.h" -#include "mongo/util/log.h" namespace mongo { namespace mozjs { diff --git a/src/mongo/scripting/mozjs/jsthread.cpp b/src/mongo/scripting/mozjs/jsthread.cpp index 9e89d1bb1ea..32143f7c9cc 100644 --- a/src/mongo/scripting/mozjs/jsthread.cpp +++ b/src/mongo/scripting/mozjs/jsthread.cpp @@ -44,7 +44,6 @@ #include "mongo/scripting/mozjs/valuewriter.h" #include "mongo/stdx/condition_variable.h" #include "mongo/stdx/thread.h" -#include "mongo/util/log.h" #include "mongo/util/stacktrace.h" namespace mongo { diff --git a/src/mongo/scripting/mozjs/session.cpp b/src/mongo/scripting/mozjs/session.cpp index cc7eaa204af..ec452971f85 100644 --- a/src/mongo/scripting/mozjs/session.cpp +++ b/src/mongo/scripting/mozjs/session.cpp @@ -40,7 +40,6 @@ #include "mongo/scripting/mozjs/scripting_util_gen.h" #include "mongo/scripting/mozjs/valuereader.h" #include "mongo/scripting/mozjs/wrapconstrainedmethod.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/scripting/mozjs/valuereader.cpp b/src/mongo/scripting/mozjs/valuereader.cpp index 5d321473d70..181be174b45 100644 --- a/src/mongo/scripting/mozjs/valuereader.cpp +++ b/src/mongo/scripting/mozjs/valuereader.cpp @@ -44,7 +44,6 @@ #include "mongo/scripting/mozjs/implscope.h" #include "mongo/scripting/mozjs/objectwrapper.h" #include "mongo/util/base64.h" -#include "mongo/util/log.h" namespace mongo { namespace mozjs { diff --git a/src/mongo/shell/bench.cpp b/src/mongo/shell/bench.cpp index ffa2af16563..68967a7c05c 100644 --- a/src/mongo/shell/bench.cpp +++ b/src/mongo/shell/bench.cpp @@ -44,7 +44,6 @@ #include "mongo/logv2/log.h" #include "mongo/scripting/bson_template_evaluator.h" #include "mongo/stdx/thread.h" -#include "mongo/util/log.h" #include "mongo/util/md5.h" #include "mongo/util/time_support.h" #include "mongo/util/timer.h" diff --git a/src/mongo/shell/kms_aws.cpp b/src/mongo/shell/kms_aws.cpp index 6057e15b66a..9201386d57c 100644 --- a/src/mongo/shell/kms_aws.cpp +++ b/src/mongo/shell/kms_aws.cpp @@ -43,7 +43,6 @@ #include "mongo/shell/kms_gen.h" #include "mongo/util/base64.h" #include "mongo/util/kms_message_support.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/net/sock.h" #include "mongo/util/net/ssl_manager.h" diff --git a/src/mongo/shell/shell_utils.cpp b/src/mongo/shell/shell_utils.cpp index faa1d52362c..b2b593d1772 100644 --- a/src/mongo/shell/shell_utils.cpp +++ b/src/mongo/shell/shell_utils.cpp @@ -51,6 +51,7 @@ #include "mongo/client/dbclient_base.h" #include "mongo/client/replica_set_monitor.h" #include "mongo/db/hasher.h" +#include "mongo/logv2/log.h" #include "mongo/platform/mutex.h" #include "mongo/platform/random.h" #include "mongo/scripting/engine.h" @@ -59,7 +60,6 @@ #include "mongo/shell/shell_utils_extended.h" #include "mongo/shell/shell_utils_launcher.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/processinfo.h" #include "mongo/util/quick_exit.h" #include "mongo/util/text.h" @@ -582,20 +582,24 @@ void ConnectionRegistry::killOperationsOnAllConnections(bool withPrompt) const { if (auto elem = op["client"]) { // mongod currentOp client if (elem.type() != String) { - warning() << "Ignoring operation " << op["opid"].toString(false) - << "; expected 'client' field in currentOp response to have type " - "string, but found " - << typeName(elem.type()); + LOGV2_WARNING(23916, + "Ignoring operation {op_opid_false}; expected 'client' field in " + "currentOp response to have type " + "string, but found {typeName_elem_type}", + "op_opid_false"_attr = op["opid"].toString(false), + "typeName_elem_type"_attr = typeName(elem.type())); continue; } client = elem.str(); } else if (auto elem = op["client_s"]) { // mongos currentOp client if (elem.type() != String) { - warning() << "Ignoring operation " << op["opid"].toString(false) - << "; expected 'client_s' field in currentOp response to have type " - "string, but found " - << typeName(elem.type()); + LOGV2_WARNING(23917, + "Ignoring operation {op_opid_false}; expected 'client_s' field " + "in currentOp response to have type " + "string, but found {typeName_elem_type}", + "op_opid_false"_attr = op["opid"].toString(false), + "typeName_elem_type"_attr = typeName(elem.type())); continue; } client = elem.str(); diff --git a/src/mongo/shell/shell_utils_extended.cpp b/src/mongo/shell/shell_utils_extended.cpp index 9f25c9a3a41..5d9220486c7 100644 --- a/src/mongo/shell/shell_utils_extended.cpp +++ b/src/mongo/shell/shell_utils_extended.cpp @@ -43,8 +43,8 @@ #include "mongo/scripting/engine.h" #include "mongo/shell/shell_utils.h" #include "mongo/shell/shell_utils_launcher.h" +#include "mongo/util/errno_util.h" #include "mongo/util/file.h" -#include "mongo/util/log.h" #include "mongo/util/md5.hpp" #include "mongo/util/net/socket_utils.h" #include "mongo/util/password.h" diff --git a/src/mongo/shell/shell_utils_launcher.cpp b/src/mongo/shell/shell_utils_launcher.cpp index 592eda259d0..d1cdd3e36be 100644 --- a/src/mongo/shell/shell_utils_launcher.cpp +++ b/src/mongo/shell/shell_utils_launcher.cpp @@ -69,7 +69,6 @@ #include "mongo/shell/shell_utils.h" #include "mongo/util/destructor_guard.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/quick_exit.h" #include "mongo/util/scopeguard.h" diff --git a/src/mongo/tools/bridge.cpp b/src/mongo/tools/bridge.cpp index 2405a343d5e..3e612336f9a 100644 --- a/src/mongo/tools/bridge.cpp +++ b/src/mongo/tools/bridge.cpp @@ -56,7 +56,6 @@ #include "mongo/transport/transport_layer_asio.h" #include "mongo/util/assert_util.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" #include "mongo/util/quick_exit.h" #include "mongo/util/signal_handlers.h" #include "mongo/util/str.h" diff --git a/src/mongo/transport/baton_asio_linux.h b/src/mongo/transport/baton_asio_linux.h index d036a8a278b..6c102553599 100644 --- a/src/mongo/transport/baton_asio_linux.h +++ b/src/mongo/transport/baton_asio_linux.h @@ -328,7 +328,9 @@ public: // If poll failed, it better be in EINTR if (rval < 0 && errno != EINTR) { - severe() << "error in poll: " << errnoWithDescription(errno); + LOGV2_FATAL(23921, + "error in poll: {errnoWithDescription_errno}", + "errnoWithDescription_errno"_attr = errnoWithDescription(errno)); fassertFailed(50834); } } diff --git a/src/mongo/transport/ismaster_metrics.cpp b/src/mongo/transport/ismaster_metrics.cpp new file mode 100644 index 00000000000..dc1a2b68dda --- /dev/null +++ b/src/mongo/transport/ismaster_metrics.cpp @@ -0,0 +1,97 @@ +/** + * Copyright (C) 2020-present MongoDB, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the Server Side Public License, version 1, + * as published by MongoDB, Inc. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Server Side Public License for more details. + * + * You should have received a copy of the Server Side Public License + * along with this program. If not, see + * . + * + * As a special exception, the copyright holders give permission to link the + * code of portions of this program with the OpenSSL library under certain + * conditions as described in each individual source file and distribute + * linked combinations including the program with the OpenSSL library. You + * must comply with the Server Side Public License in all respects for + * all of the code used other than as permitted herein. If you modify file(s) + * with this exception, you may extend this exception to your version of the + * file(s), but you are not obligated to do so. If you do not wish to do so, + * delete this exception statement from your version. If you delete this + * exception statement from all source files in the program, then also delete + * it in the license file. + */ +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kNetwork +#include "mongo/transport/ismaster_metrics.h" + +namespace mongo { +namespace { +const auto IsMasterMetricsDecoration = ServiceContext::declareDecoration(); +const auto InExhaustIsMasterDecoration = transport::Session::declareDecoration(); +} // namespace + +IsMasterMetrics* IsMasterMetrics::get(ServiceContext* service) { + return &IsMasterMetricsDecoration(service); +} + +IsMasterMetrics* IsMasterMetrics::get(OperationContext* opCtx) { + return get(opCtx->getServiceContext()); +} + +size_t IsMasterMetrics::getNumExhaustIsMaster() const { + return _exhaustIsMasterConnections.load(); +} + +void IsMasterMetrics::incrementNumExhaustIsMaster() { + _exhaustIsMasterConnections.fetchAndAdd(1); +} + +void IsMasterMetrics::decrementNumExhaustIsMaster() { + _exhaustIsMasterConnections.fetchAndSubtract(1); +} + +size_t IsMasterMetrics::getNumAwaitingTopologyChanges() const { + return _connectionsAwaitingTopologyChanges.load(); +} + +void IsMasterMetrics::incrementNumAwaitingTopologyChanges() { + _connectionsAwaitingTopologyChanges.fetchAndAdd(1); +} + +void IsMasterMetrics::decrementNumAwaitingTopologyChanges() { + _connectionsAwaitingTopologyChanges.fetchAndSubtract(1); +} + +void IsMasterMetrics::resetNumAwaitingTopologyChanges() { + _connectionsAwaitingTopologyChanges.store(0); +} + +InExhaustIsMaster* InExhaustIsMaster::get(transport::Session* session) { + return &InExhaustIsMasterDecoration(session); +} + +InExhaustIsMaster::~InExhaustIsMaster() { + if (_inExhaustIsMaster) { + IsMasterMetrics::get(getGlobalServiceContext())->decrementNumExhaustIsMaster(); + } +} + +bool InExhaustIsMaster::getInExhaustIsMaster() const { + return _inExhaustIsMaster; +} + +void InExhaustIsMaster::setInExhaustIsMaster(bool inExhaustIsMaster) { + if (!_inExhaustIsMaster && inExhaustIsMaster) { + IsMasterMetrics::get(getGlobalServiceContext())->incrementNumExhaustIsMaster(); + } else if (_inExhaustIsMaster && !inExhaustIsMaster) { + IsMasterMetrics::get(getGlobalServiceContext())->decrementNumExhaustIsMaster(); + } + _inExhaustIsMaster = inExhaustIsMaster; +} + +} // namespace mongo \ No newline at end of file diff --git a/src/mongo/transport/message_compressor_manager.cpp b/src/mongo/transport/message_compressor_manager.cpp index a0bbf922112..1214149832e 100644 --- a/src/mongo/transport/message_compressor_manager.cpp +++ b/src/mongo/transport/message_compressor_manager.cpp @@ -41,7 +41,6 @@ #include "mongo/rpc/message.h" #include "mongo/transport/message_compressor_registry.h" #include "mongo/transport/session.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/transport/message_compressor_manager_test.cpp b/src/mongo/transport/message_compressor_manager_test.cpp index c5c5f05f8a0..cc3b4bafb74 100644 --- a/src/mongo/transport/message_compressor_manager_test.cpp +++ b/src/mongo/transport/message_compressor_manager_test.cpp @@ -44,7 +44,6 @@ #include "mongo/transport/message_compressor_zlib.h" #include "mongo/transport/message_compressor_zstd.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/transport/service_entry_point_impl.cpp b/src/mongo/transport/service_entry_point_impl.cpp index 9381e1e7b95..b219240e6fa 100644 --- a/src/mongo/transport/service_entry_point_impl.cpp +++ b/src/mongo/transport/service_entry_point_impl.cpp @@ -40,7 +40,6 @@ #include "mongo/logv2/log.h" #include "mongo/transport/service_state_machine.h" #include "mongo/transport/session.h" -#include "mongo/util/log.h" #include "mongo/util/processinfo.h" #include "mongo/util/scopeguard.h" diff --git a/src/mongo/transport/service_entry_point_utils.cpp b/src/mongo/transport/service_entry_point_utils.cpp index ea273c7564e..f4e894e1168 100644 --- a/src/mongo/transport/service_entry_point_utils.cpp +++ b/src/mongo/transport/service_entry_point_utils.cpp @@ -40,7 +40,6 @@ #include "mongo/stdx/thread.h" #include "mongo/util/assert_util.h" #include "mongo/util/debug_util.h" -#include "mongo/util/log.h" #if !defined(_WIN32) #include diff --git a/src/mongo/transport/service_executor_adaptive.cpp b/src/mongo/transport/service_executor_adaptive.cpp index b43635df36c..6b6bb17885e 100644 --- a/src/mongo/transport/service_executor_adaptive.cpp +++ b/src/mongo/transport/service_executor_adaptive.cpp @@ -42,7 +42,6 @@ #include "mongo/transport/service_executor_task_names.h" #include "mongo/util/concurrency/thread_name.h" #include "mongo/util/duration.h" -#include "mongo/util/log.h" #include "mongo/util/processinfo.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" diff --git a/src/mongo/transport/service_executor_adaptive_test.cpp b/src/mongo/transport/service_executor_adaptive_test.cpp index d2bce821868..52cb1b4f85f 100644 --- a/src/mongo/transport/service_executor_adaptive_test.cpp +++ b/src/mongo/transport/service_executor_adaptive_test.cpp @@ -37,7 +37,6 @@ #include "mongo/logv2/log.h" #include "mongo/transport/service_executor_adaptive.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include diff --git a/src/mongo/transport/service_executor_reserved.cpp b/src/mongo/transport/service_executor_reserved.cpp index af114738ce7..fffd3d5a935 100644 --- a/src/mongo/transport/service_executor_reserved.cpp +++ b/src/mongo/transport/service_executor_reserved.cpp @@ -38,7 +38,6 @@ #include "mongo/transport/service_entry_point_utils.h" #include "mongo/transport/service_executor_gen.h" #include "mongo/transport/service_executor_task_names.h" -#include "mongo/util/log.h" #include "mongo/util/processinfo.h" namespace mongo { diff --git a/src/mongo/transport/service_executor_synchronous.cpp b/src/mongo/transport/service_executor_synchronous.cpp index 91cdf907b60..f0c991d5564 100644 --- a/src/mongo/transport/service_executor_synchronous.cpp +++ b/src/mongo/transport/service_executor_synchronous.cpp @@ -38,7 +38,6 @@ #include "mongo/transport/service_entry_point_utils.h" #include "mongo/transport/service_executor_gen.h" #include "mongo/transport/service_executor_task_names.h" -#include "mongo/util/log.h" #include "mongo/util/processinfo.h" namespace mongo { diff --git a/src/mongo/transport/service_executor_test.cpp b/src/mongo/transport/service_executor_test.cpp index af4e8ca7b49..3284ce1304a 100644 --- a/src/mongo/transport/service_executor_test.cpp +++ b/src/mongo/transport/service_executor_test.cpp @@ -39,7 +39,6 @@ #include "mongo/transport/service_executor_synchronous.h" #include "mongo/transport/service_executor_task_names.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include diff --git a/src/mongo/transport/service_state_machine.cpp b/src/mongo/transport/service_state_machine.cpp index 041d2fdb715..7e33191b98d 100644 --- a/src/mongo/transport/service_state_machine.cpp +++ b/src/mongo/transport/service_state_machine.cpp @@ -53,7 +53,6 @@ #include "mongo/util/concurrency/thread_name.h" #include "mongo/util/debug_util.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" #include "mongo/util/net/socket_exception.h" #include "mongo/util/quick_exit.h" diff --git a/src/mongo/transport/service_state_machine_test.cpp b/src/mongo/transport/service_state_machine_test.cpp index 3373f2ece2a..0b9d4eac5f3 100644 --- a/src/mongo/transport/service_state_machine_test.cpp +++ b/src/mongo/transport/service_state_machine_test.cpp @@ -50,7 +50,6 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" #include "mongo/util/clock_source_mock.h" -#include "mongo/util/log.h" #include "mongo/util/tick_source_mock.h" namespace mongo { diff --git a/src/mongo/transport/session_asio.h b/src/mongo/transport/session_asio.h index a7c9512b4b2..6efbd104b0a 100644 --- a/src/mongo/transport/session_asio.h +++ b/src/mongo/transport/session_asio.h @@ -145,7 +145,9 @@ public: std::error_code ec; getSocket().shutdown(GenericSocket::shutdown_both, ec); if ((ec) && (ec != asio::error::not_connected)) { - error() << "Error shutting down socket: " << ec.message(); + LOGV2_ERROR(23841, + "Error shutting down socket: {ec_message}", + "ec_message"_attr = ec.message()); } } } @@ -385,7 +387,7 @@ private: sb << "recv(): message msgLen " << msgLen << " is invalid. " << "Min " << kHeaderSize << " Max: " << MaxMessageSizeBytes; const auto str = sb.str(); - LOG(0) << str; + LOGV2(23837, "{str}", "str"_attr = str); return Future::makeReady(Status(ErrorCodes::ProtocolError, str)); } @@ -660,8 +662,11 @@ private: } else { if (!sslGlobalParams.disableNonSSLConnectionLogging && _tl->_sslMode() == SSLParams::SSLMode_preferSSL) { - LOG(0) << "SSL mode is set to 'preferred' and connection " << id() << " to " - << remote() << " is not using SSL."; + LOGV2(23838, + "SSL mode is set to 'preferred' and connection {id} to {remote} is not using " + "SSL.", + "id"_attr = id(), + "remote"_attr = remote()); } return Future::makeReady(false); } diff --git a/src/mongo/transport/transport_layer_asio.cpp b/src/mongo/transport/transport_layer_asio.cpp index 6c85e7ee8f5..a22ffdd7e2e 100644 --- a/src/mongo/transport/transport_layer_asio.cpp +++ b/src/mongo/transport/transport_layer_asio.cpp @@ -51,7 +51,6 @@ #include "mongo/transport/service_entry_point.h" #include "mongo/transport/transport_options_gen.h" #include "mongo/util/hierarchical_acquisition.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/net/sockaddr.h" #include "mongo/util/net/ssl_manager.h" diff --git a/src/mongo/transport/transport_layer_asio_integration_test.cpp b/src/mongo/transport/transport_layer_asio_integration_test.cpp index ca8211af7b0..ec7981b615a 100644 --- a/src/mongo/transport/transport_layer_asio_integration_test.cpp +++ b/src/mongo/transport/transport_layer_asio_integration_test.cpp @@ -45,7 +45,6 @@ #include "mongo/unittest/integration_test.h" #include "mongo/unittest/unittest.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "asio.hpp" diff --git a/src/mongo/transport/transport_layer_asio_test.cpp b/src/mongo/transport/transport_layer_asio_test.cpp index 9e23beb33fd..1cc7b04f53d 100644 --- a/src/mongo/transport/transport_layer_asio_test.cpp +++ b/src/mongo/transport/transport_layer_asio_test.cpp @@ -38,7 +38,6 @@ #include "mongo/transport/service_entry_point.h" #include "mongo/unittest/unittest.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/net/sock.h" #include "asio.hpp" diff --git a/src/mongo/unittest/benchmark_main.cpp b/src/mongo/unittest/benchmark_main.cpp index 6256b6d7281..3d68ca5cc3c 100644 --- a/src/mongo/unittest/benchmark_main.cpp +++ b/src/mongo/unittest/benchmark_main.cpp @@ -37,7 +37,6 @@ #include "mongo/config.h" #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/signal_handlers_synchronous.h" diff --git a/src/mongo/unittest/integration_test_main.cpp b/src/mongo/unittest/integration_test_main.cpp index 85b966fbb79..91c16c90923 100644 --- a/src/mongo/unittest/integration_test_main.cpp +++ b/src/mongo/unittest/integration_test_main.cpp @@ -44,7 +44,6 @@ #include "mongo/logv2/log.h" #include "mongo/transport/transport_layer_asio.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" #include "mongo/util/options_parser/environment.h" #include "mongo/util/options_parser/option_section.h" #include "mongo/util/options_parser/options_parser.h" diff --git a/src/mongo/unittest/temp_dir.cpp b/src/mongo/unittest/temp_dir.cpp index 3ba1a70cee2..b73ba395b27 100644 --- a/src/mongo/unittest/temp_dir.cpp +++ b/src/mongo/unittest/temp_dir.cpp @@ -38,7 +38,6 @@ #include "mongo/base/init.h" #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" #include "mongo/util/options_parser/startup_option_init.h" #include "mongo/util/options_parser/startup_options.h" #include "mongo/util/str.h" diff --git a/src/mongo/util/alarm_test.cpp b/src/mongo/util/alarm_test.cpp index 9a712544d4b..b1eba261cee 100644 --- a/src/mongo/util/alarm_test.cpp +++ b/src/mongo/util/alarm_test.cpp @@ -36,7 +36,6 @@ #include "mongo/util/alarm.h" #include "mongo/util/alarm_runner_background_thread.h" #include "mongo/util/clock_source_mock.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/util/background.cpp b/src/mongo/util/background.cpp index 995f3558017..d1db0ce6ee3 100644 --- a/src/mongo/util/background.cpp +++ b/src/mongo/util/background.cpp @@ -46,7 +46,6 @@ #include "mongo/util/concurrency/thread_name.h" #include "mongo/util/debug_util.h" #include "mongo/util/hierarchical_acquisition.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/timer.h" diff --git a/src/mongo/util/background_thread_clock_source.cpp b/src/mongo/util/background_thread_clock_source.cpp index 36eb958f7b8..90dd8bb085f 100644 --- a/src/mongo/util/background_thread_clock_source.cpp +++ b/src/mongo/util/background_thread_clock_source.cpp @@ -39,7 +39,6 @@ #include "mongo/stdx/thread.h" #include "mongo/util/concurrency/idle_thread_block.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/util/concurrency/thread_name.cpp b/src/mongo/util/concurrency/thread_name.cpp index ecd727c4c79..73444d5e6bc 100644 --- a/src/mongo/util/concurrency/thread_name.cpp +++ b/src/mongo/util/concurrency/thread_name.cpp @@ -53,7 +53,6 @@ #include "mongo/config.h" #include "mongo/logv2/log.h" #include "mongo/platform/atomic_word.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/util/concurrency/thread_pool_test.cpp b/src/mongo/util/concurrency/thread_pool_test.cpp index fc246470bf1..9546a3366d6 100644 --- a/src/mongo/util/concurrency/thread_pool_test.cpp +++ b/src/mongo/util/concurrency/thread_pool_test.cpp @@ -43,7 +43,6 @@ #include "mongo/util/concurrency/thread_pool.h" #include "mongo/util/concurrency/thread_pool_test_common.h" #include "mongo/util/concurrency/thread_pool_test_fixture.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" #include "mongo/util/timer.h" diff --git a/src/mongo/util/concurrency/thread_pool_test_common.cpp b/src/mongo/util/concurrency/thread_pool_test_common.cpp index 2e5d74e0ab9..7c440579160 100644 --- a/src/mongo/util/concurrency/thread_pool_test_common.cpp +++ b/src/mongo/util/concurrency/thread_pool_test_common.cpp @@ -35,13 +35,13 @@ #include +#include "mongo/logv2/log.h" #include "mongo/platform/mutex.h" #include "mongo/stdx/condition_variable.h" #include "mongo/unittest/death_test.h" #include "mongo/util/assert_util.h" #include "mongo/util/concurrency/thread_pool_interface.h" #include "mongo/util/concurrency/thread_pool_test_fixture.h" -#include "mongo/util/log.h" namespace mongo { namespace { @@ -78,7 +78,9 @@ public: TptRegistrationAgent(const std::string& name, ThreadPoolTestCaseFactory makeTest) { auto& entry = threadPoolTestCaseRegistry()[name]; if (entry) { - severe() << "Multiple attempts to register ThreadPoolTest named " << name; + LOGV2_FATAL(23922, + "Multiple attempts to register ThreadPoolTest named {name}", + "name"_attr = name); fassertFailed(34355); } entry = std::move(makeTest); @@ -94,7 +96,9 @@ public: TptDeathRegistrationAgent(const std::string& name, ThreadPoolTestCaseFactory makeTest) { auto& entry = threadPoolTestCaseRegistry()[name]; if (entry) { - severe() << "Multiple attempts to register ThreadPoolDeathTest named " << name; + LOGV2_FATAL(23923, + "Multiple attempts to register ThreadPoolDeathTest named {name}", + "name"_attr = name); fassertFailed(34356); } entry = [makeTest](ThreadPoolFactory makeThreadPool) { diff --git a/src/mongo/util/concurrency/ticketholder.cpp b/src/mongo/util/concurrency/ticketholder.cpp index 13430c48640..45bf7e51bc2 100644 --- a/src/mongo/util/concurrency/ticketholder.cpp +++ b/src/mongo/util/concurrency/ticketholder.cpp @@ -36,7 +36,6 @@ #include #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" namespace mongo { diff --git a/src/mongo/util/concurrency/with_lock_test.cpp b/src/mongo/util/concurrency/with_lock_test.cpp index 1c5f6acf375..8f3b7e3cda0 100644 --- a/src/mongo/util/concurrency/with_lock_test.cpp +++ b/src/mongo/util/concurrency/with_lock_test.cpp @@ -35,7 +35,6 @@ #include "mongo/platform/mutex.h" #include "mongo/unittest/unittest.h" #include "mongo/util/concurrency/with_lock.h" -#include "mongo/util/log.h" #include diff --git a/src/mongo/util/decorable_test.cpp b/src/mongo/util/decorable_test.cpp index 6257b840f4a..7c414958e70 100644 --- a/src/mongo/util/decorable_test.cpp +++ b/src/mongo/util/decorable_test.cpp @@ -38,7 +38,6 @@ #include "mongo/util/decorable.h" #include "mongo/util/decoration_container.h" #include "mongo/util/decoration_registry.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/util/diagnostic_info.cpp b/src/mongo/util/diagnostic_info.cpp index b561c588ee3..9e8b6249167 100644 --- a/src/mongo/util/diagnostic_info.cpp +++ b/src/mongo/util/diagnostic_info.cpp @@ -45,7 +45,6 @@ #include "mongo/util/clock_source.h" #include "mongo/util/hierarchical_acquisition.h" #include "mongo/util/interruptible.h" -#include "mongo/util/log.h" using namespace fmt::literals; diff --git a/src/mongo/util/diagnostic_info_test.cpp b/src/mongo/util/diagnostic_info_test.cpp index 3c054d685dc..afdc357f0f3 100644 --- a/src/mongo/util/diagnostic_info_test.cpp +++ b/src/mongo/util/diagnostic_info_test.cpp @@ -37,7 +37,6 @@ #include "mongo/platform/compiler.h" #include "mongo/unittest/unittest.h" #include "mongo/util/clock_source_mock.h" -#include "mongo/util/log.h" namespace mongo { TEST(DiagnosticInfo, BasicSingleThread) { diff --git a/src/mongo/util/exception_filter_win32.cpp b/src/mongo/util/exception_filter_win32.cpp index b9d84dcee1f..26efcd8819e 100644 --- a/src/mongo/util/exception_filter_win32.cpp +++ b/src/mongo/util/exception_filter_win32.cpp @@ -45,7 +45,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" #include "mongo/util/exit_code.h" -#include "mongo/util/log.h" #include "mongo/util/quick_exit.h" #include "mongo/util/stacktrace_windows.h" #include "mongo/util/text.h" diff --git a/src/mongo/util/exit.cpp b/src/mongo/util/exit.cpp index 5057aaa1498..9bf0fcfe5b3 100644 --- a/src/mongo/util/exit.cpp +++ b/src/mongo/util/exit.cpp @@ -41,7 +41,6 @@ #include "mongo/platform/mutex.h" #include "mongo/stdx/condition_variable.h" #include "mongo/stdx/thread.h" -#include "mongo/util/log.h" #include "mongo/util/quick_exit.h" namespace mongo { diff --git a/src/mongo/util/fail_point.cpp b/src/mongo/util/fail_point.cpp index 26a02782f09..f439cdd1fbb 100644 --- a/src/mongo/util/fail_point.cpp +++ b/src/mongo/util/fail_point.cpp @@ -46,7 +46,6 @@ #include "mongo/stdx/thread.h" #include "mongo/util/assert_util.h" #include "mongo/util/fail_point_server_parameter_gen.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/util/file.cpp b/src/mongo/util/file.cpp index 226592485bd..6b0fe3c00af 100644 --- a/src/mongo/util/file.cpp +++ b/src/mongo/util/file.cpp @@ -47,7 +47,6 @@ #include "mongo/platform/basic.h" #include "mongo/util/allocator.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/text.h" diff --git a/src/mongo/util/heap_profiler.cpp b/src/mongo/util/heap_profiler.cpp index 7d02ed21cc5..118dd6bc116 100644 --- a/src/mongo/util/heap_profiler.cpp +++ b/src/mongo/util/heap_profiler.cpp @@ -39,7 +39,6 @@ #include "mongo/config.h" #include "mongo/db/commands/server_status.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/stacktrace.h" #include "mongo/util/tcmalloc_parameters_gen.h" diff --git a/src/mongo/util/net/hostname_canonicalization.cpp b/src/mongo/util/net/hostname_canonicalization.cpp index 0e9f06d7e3c..2743cf20539 100644 --- a/src/mongo/util/net/hostname_canonicalization.cpp +++ b/src/mongo/util/net/hostname_canonicalization.cpp @@ -42,7 +42,6 @@ #endif #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/net/sockaddr.h" #include "mongo/util/scopeguard.h" #include "mongo/util/text.h" diff --git a/src/mongo/util/net/http_client_curl.cpp b/src/mongo/util/net/http_client_curl.cpp index bddb5fb910f..853b9699552 100644 --- a/src/mongo/util/net/http_client_curl.cpp +++ b/src/mongo/util/net/http_client_curl.cpp @@ -46,7 +46,6 @@ #include "mongo/bson/bsonobjbuilder.h" #include "mongo/platform/mutex.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #include "mongo/util/net/http_client.h" namespace mongo { diff --git a/src/mongo/util/net/http_client_winhttp.cpp b/src/mongo/util/net/http_client_winhttp.cpp index 1a54d4be355..4401059d23e 100644 --- a/src/mongo/util/net/http_client_winhttp.cpp +++ b/src/mongo/util/net/http_client_winhttp.cpp @@ -49,7 +49,6 @@ #include "mongo/bson/bsonobjbuilder.h" #include "mongo/util/assert_util.h" #include "mongo/util/errno_util.h" -#include "mongo/util/log.h" #include "mongo/util/net/http_client.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" diff --git a/src/mongo/util/net/openssl_init.cpp b/src/mongo/util/net/openssl_init.cpp index 60096c06756..0256e26941b 100644 --- a/src/mongo/util/net/openssl_init.cpp +++ b/src/mongo/util/net/openssl_init.cpp @@ -34,7 +34,6 @@ #include "mongo/base/init.h" #include "mongo/config.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/net/ssl_manager.h" #include "mongo/util/net/ssl_options.h" diff --git a/src/mongo/util/net/private/ssl_expiration.cpp b/src/mongo/util/net/private/ssl_expiration.cpp index 1e00f07b0d0..f43b4e9411a 100644 --- a/src/mongo/util/net/private/ssl_expiration.cpp +++ b/src/mongo/util/net/private/ssl_expiration.cpp @@ -34,7 +34,6 @@ #include #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/util/net/socket_utils.cpp b/src/mongo/util/net/socket_utils.cpp index 42c2e38eac8..d286e81eea3 100644 --- a/src/mongo/util/net/socket_utils.cpp +++ b/src/mongo/util/net/socket_utils.cpp @@ -57,7 +57,7 @@ #include "mongo/logv2/log.h" #include "mongo/util/concurrency/value.h" #include "mongo/util/errno_util.h" -#include "mongo/util/log.h" +#include "mongo/util/exit_code.h" #include "mongo/util/net/sockaddr.h" #include "mongo/util/quick_exit.h" #include "mongo/util/str.h" diff --git a/src/mongo/util/net/ssl_manager.cpp b/src/mongo/util/net/ssl_manager.cpp index fd888831e5c..62158cdb7b1 100644 --- a/src/mongo/util/net/ssl_manager.cpp +++ b/src/mongo/util/net/ssl_manager.cpp @@ -47,7 +47,6 @@ #include "mongo/transport/session.h" #include "mongo/util/hex.h" #include "mongo/util/icu.h" -#include "mongo/util/log.h" #include "mongo/util/net/ssl_options.h" #include "mongo/util/net/ssl_parameters_gen.h" #include "mongo/util/str.h" diff --git a/src/mongo/util/net/ssl_manager_apple.cpp b/src/mongo/util/net/ssl_manager_apple.cpp index 15d71d5ac73..2ddf23cd7ed 100644 --- a/src/mongo/util/net/ssl_manager_apple.cpp +++ b/src/mongo/util/net/ssl_manager_apple.cpp @@ -47,7 +47,6 @@ #include "mongo/platform/random.h" #include "mongo/util/base64.h" #include "mongo/util/concurrency/mutex.h" -#include "mongo/util/log.h" #include "mongo/util/net/cidr.h" #include "mongo/util/net/private/ssl_expiration.h" #include "mongo/util/net/socket_exception.h" diff --git a/src/mongo/util/net/ssl_manager_openssl.cpp b/src/mongo/util/net/ssl_manager_openssl.cpp index 1a992f66b44..5627dafadc9 100644 --- a/src/mongo/util/net/ssl_manager_openssl.cpp +++ b/src/mongo/util/net/ssl_manager_openssl.cpp @@ -55,7 +55,6 @@ #include "mongo/util/debug_util.h" #include "mongo/util/exit.h" #include "mongo/util/fail_point.h" -#include "mongo/util/log.h" #include "mongo/util/net/cidr.h" #include "mongo/util/net/dh_openssl.h" #include "mongo/util/net/ocsp/ocsp_manager.h" @@ -1752,18 +1751,18 @@ bool SSLManagerOpenSSL::_parseAndValidateCertificate(const std::string& keyFile, if (serverCertificateExpirationDate != nullptr) { auto notBeforeMillis = convertASN1ToMillis(X509_get_notBefore(x509)); if (notBeforeMillis == Date_t()) { - error() << "date conversion failed"; + LOGV2_ERROR(23873, "date conversion failed"); return false; } auto notAfterMillis = convertASN1ToMillis(X509_get_notAfter(x509)); if (notAfterMillis == Date_t()) { - error() << "date conversion failed"; + LOGV2_ERROR(23874, "date conversion failed"); return false; } if ((notBeforeMillis > Date_t::now()) || (Date_t::now() > notAfterMillis)) { - severe() << "The provided SSL certificate is expired or not yet valid."; + LOGV2_FATAL(23875, "The provided SSL certificate is expired or not yet valid."); fassertFailedNoTrace(28652); } diff --git a/src/mongo/util/net/ssl_manager_test.cpp b/src/mongo/util/net/ssl_manager_test.cpp index c5c05ff5bf3..5815da8f5ad 100644 --- a/src/mongo/util/net/ssl_manager_test.cpp +++ b/src/mongo/util/net/ssl_manager_test.cpp @@ -36,7 +36,6 @@ #include "mongo/config.h" #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" #if MONGO_CONFIG_SSL_PROVIDER == MONGO_CONFIG_SSL_PROVIDER_OPENSSL #include "mongo/util/net/dh_openssl.h" diff --git a/src/mongo/util/net/ssl_manager_windows.cpp b/src/mongo/util/net/ssl_manager_windows.cpp index c20531769e1..11fc3a39bec 100644 --- a/src/mongo/util/net/ssl_manager_windows.cpp +++ b/src/mongo/util/net/ssl_manager_windows.cpp @@ -53,7 +53,6 @@ #include "mongo/util/debug_util.h" #include "mongo/util/exit.h" #include "mongo/util/hex.h" -#include "mongo/util/log.h" #include "mongo/util/net/private/ssl_expiration.h" #include "mongo/util/net/sockaddr.h" #include "mongo/util/net/socket_exception.h" diff --git a/src/mongo/util/net/ssl_options.cpp b/src/mongo/util/net/ssl_options.cpp index 30389860a29..973f566c8ba 100644 --- a/src/mongo/util/net/ssl_options.cpp +++ b/src/mongo/util/net/ssl_options.cpp @@ -39,7 +39,6 @@ #include "mongo/config.h" #include "mongo/db/server_options.h" #include "mongo/util/hex.h" -#include "mongo/util/log.h" #include "mongo/util/options_parser/startup_options.h" #include "mongo/util/text.h" diff --git a/src/mongo/util/net/ssl_options_server.cpp b/src/mongo/util/net/ssl_options_server.cpp index 56b0be72190..b3f2e892a90 100644 --- a/src/mongo/util/net/ssl_options_server.cpp +++ b/src/mongo/util/net/ssl_options_server.cpp @@ -39,7 +39,6 @@ #include "mongo/config.h" #include "mongo/db/server_options.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/options_parser/startup_option_init.h" #include "mongo/util/options_parser/startup_options.h" #include "mongo/util/text.h" diff --git a/src/mongo/util/net/ssl_parameters.cpp b/src/mongo/util/net/ssl_parameters.cpp index 92790983c70..1ebc409f0be 100644 --- a/src/mongo/util/net/ssl_parameters.cpp +++ b/src/mongo/util/net/ssl_parameters.cpp @@ -38,7 +38,6 @@ #include "mongo/db/auth/sasl_command_constants.h" #include "mongo/db/server_options.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/net/ssl_options.h" #include "mongo/util/net/ssl_parameters_gen.h" diff --git a/src/mongo/util/ntservice.cpp b/src/mongo/util/ntservice.cpp index 2a51081bb4a..baae68bf70e 100644 --- a/src/mongo/util/ntservice.cpp +++ b/src/mongo/util/ntservice.cpp @@ -43,7 +43,6 @@ #include "mongo/stdx/thread.h" #include "mongo/util/assert_util.h" #include "mongo/util/exit.h" -#include "mongo/util/log.h" #include "mongo/util/options_parser/environment.h" #include "mongo/util/quick_exit.h" #include "mongo/util/signal_handlers.h" diff --git a/src/mongo/util/options_parser/options_parser.cpp b/src/mongo/util/options_parser/options_parser.cpp index 5975d1e20c5..cea7a1e5792 100644 --- a/src/mongo/util/options_parser/options_parser.cpp +++ b/src/mongo/util/options_parser/options_parser.cpp @@ -59,7 +59,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" #include "mongo/util/hex.h" -#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/net/http_client.h" #include "mongo/util/options_parser/constraints.h" diff --git a/src/mongo/util/password.cpp b/src/mongo/util/password.cpp index a9d32b75495..dae8a0778ad 100644 --- a/src/mongo/util/password.cpp +++ b/src/mongo/util/password.cpp @@ -39,7 +39,7 @@ #include #endif -#include "mongo/util/log.h" +#include "mongo/util/errno_util.h" #include "mongo/util/password_params_gen.h" namespace mongo { diff --git a/src/mongo/util/perfctr_collect.cpp b/src/mongo/util/perfctr_collect.cpp index 4fbe98dd419..9ed23370de8 100644 --- a/src/mongo/util/perfctr_collect.cpp +++ b/src/mongo/util/perfctr_collect.cpp @@ -35,7 +35,7 @@ #include "mongo/base/init.h" #include "mongo/bson/bsonobjbuilder.h" -#include "mongo/util/log.h" +#include "mongo/util/errno_util.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" #include "mongo/util/text.h" diff --git a/src/mongo/util/perfctr_collect_test.cpp b/src/mongo/util/perfctr_collect_test.cpp index 869f72f9e20..12776ffa62b 100644 --- a/src/mongo/util/perfctr_collect_test.cpp +++ b/src/mongo/util/perfctr_collect_test.cpp @@ -39,7 +39,6 @@ #include "mongo/bson/bsonobj.h" #include "mongo/bson/bsonobjbuilder.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/util/periodic_runner_impl.cpp b/src/mongo/util/periodic_runner_impl.cpp index 182e8ad7837..59a57470552 100644 --- a/src/mongo/util/periodic_runner_impl.cpp +++ b/src/mongo/util/periodic_runner_impl.cpp @@ -37,7 +37,6 @@ #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" #include "mongo/util/clock_source.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" namespace mongo { diff --git a/src/mongo/util/platform_init.cpp b/src/mongo/util/platform_init.cpp index 0299d467f33..a633c428232 100644 --- a/src/mongo/util/platform_init.cpp +++ b/src/mongo/util/platform_init.cpp @@ -40,7 +40,6 @@ #include "mongo/base/init.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/stacktrace.h" #ifdef _WIN32 diff --git a/src/mongo/util/processinfo.cpp b/src/mongo/util/processinfo.cpp index 9501f0eefcf..8af73cfa258 100644 --- a/src/mongo/util/processinfo.cpp +++ b/src/mongo/util/processinfo.cpp @@ -40,7 +40,6 @@ #include #include "mongo/logv2/log.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/util/processinfo_freebsd.cpp b/src/mongo/util/processinfo_freebsd.cpp index ec6c732497c..70ae9698ecc 100644 --- a/src/mongo/util/processinfo_freebsd.cpp +++ b/src/mongo/util/processinfo_freebsd.cpp @@ -44,7 +44,6 @@ #include #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "processinfo.h" diff --git a/src/mongo/util/processinfo_linux.cpp b/src/mongo/util/processinfo_linux.cpp index dde30376ce2..cbf5be2448f 100644 --- a/src/mongo/util/processinfo_linux.cpp +++ b/src/mongo/util/processinfo_linux.cpp @@ -56,7 +56,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/file.h" -#include "mongo/util/log.h" #define KLONG long #define KLF "l" diff --git a/src/mongo/util/processinfo_openbsd.cpp b/src/mongo/util/processinfo_openbsd.cpp index d358a7a797c..4cc317d2e50 100644 --- a/src/mongo/util/processinfo_openbsd.cpp +++ b/src/mongo/util/processinfo_openbsd.cpp @@ -43,7 +43,6 @@ #include #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "processinfo.h" diff --git a/src/mongo/util/processinfo_osx.cpp b/src/mongo/util/processinfo_osx.cpp index 3bc13439d16..aa018e3f985 100644 --- a/src/mongo/util/processinfo_osx.cpp +++ b/src/mongo/util/processinfo_osx.cpp @@ -49,7 +49,6 @@ #include "mongo/db/jsobj.h" #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/processinfo.h" namespace mongo { diff --git a/src/mongo/util/processinfo_solaris.cpp b/src/mongo/util/processinfo_solaris.cpp index d20328c9cae..fd52e6d5fe3 100644 --- a/src/mongo/util/processinfo_solaris.cpp +++ b/src/mongo/util/processinfo_solaris.cpp @@ -47,7 +47,6 @@ #include "mongo/logv2/log.h" #include "mongo/util/file.h" -#include "mongo/util/log.h" #include "mongo/util/processinfo.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" diff --git a/src/mongo/util/processinfo_windows.cpp b/src/mongo/util/processinfo_windows.cpp index dd73eb49f81..a5e18cb0a5e 100644 --- a/src/mongo/util/processinfo_windows.cpp +++ b/src/mongo/util/processinfo_windows.cpp @@ -38,7 +38,6 @@ #include #include "mongo/logv2/log.h" -#include "mongo/util/log.h" #include "mongo/util/processinfo.h" namespace mongo { diff --git a/src/mongo/util/procparser.cpp b/src/mongo/util/procparser.cpp index 78e1a244155..45c8effbf4f 100644 --- a/src/mongo/util/procparser.cpp +++ b/src/mongo/util/procparser.cpp @@ -50,7 +50,7 @@ #include "mongo/base/status_with.h" #include "mongo/base/string_data.h" #include "mongo/bson/bsonobjbuilder.h" -#include "mongo/util/log.h" +#include "mongo/logv2/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/str.h" #include "mongo/util/text.h" @@ -659,8 +659,10 @@ bool isInterestingDisk(const boost::filesystem::path& path) { } if (ec) { - warning() << "Error checking directory '" << blockDevicePath.generic_string() - << "': " << ec.message(); + LOGV2_WARNING(23912, + "Error checking directory '{blockDevicePath_generic_string}': {ec_message}", + "blockDevicePath_generic_string"_attr = blockDevicePath.generic_string(), + "ec_message"_attr = ec.message()); return false; } @@ -679,13 +681,19 @@ std::vector findPhysicalDisks(StringData sysBlockPath) { auto statusSysBlock = boost::filesystem::status(sysBlockPathStr, ec); if (ec) { - warning() << "Error checking directory '" << sysBlockPathStr << "': " << ec.message(); + LOGV2_WARNING(23913, + "Error checking directory '{sysBlockPathStr}': {ec_message}", + "sysBlockPathStr"_attr = sysBlockPathStr, + "ec_message"_attr = ec.message()); return {}; } if (!(boost::filesystem::exists(statusSysBlock) && boost::filesystem::is_directory(statusSysBlock))) { - warning() << "Could not find directory '" << sysBlockPathStr << "': " << ec.message(); + LOGV2_WARNING(23914, + "Could not find directory '{sysBlockPathStr}': {ec_message}", + "sysBlockPathStr"_attr = sysBlockPathStr, + "ec_message"_attr = ec.message()); return {}; } @@ -696,8 +704,10 @@ std::vector findPhysicalDisks(StringData sysBlockPath) { // disk device. It does not contain disk partitions. boost::filesystem::directory_iterator di(sysBlockPathStr, ec); if (ec) { - warning() << "Error getting directory iterator '" << sysBlockPathStr - << "': " << ec.message(); + LOGV2_WARNING(23915, + "Error getting directory iterator '{sysBlockPathStr}': {ec_message}", + "sysBlockPathStr"_attr = sysBlockPathStr, + "ec_message"_attr = ec.message()); return {}; } diff --git a/src/mongo/util/procparser_test.cpp b/src/mongo/util/procparser_test.cpp index 2429b119750..4db5ff0b745 100644 --- a/src/mongo/util/procparser_test.cpp +++ b/src/mongo/util/procparser_test.cpp @@ -40,7 +40,6 @@ #include "mongo/bson/bsonobjbuilder.h" #include "mongo/logv2/log.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/util/signal_handlers_synchronous.cpp b/src/mongo/util/signal_handlers_synchronous.cpp index 27c12f76616..ac0df71c6ac 100644 --- a/src/mongo/util/signal_handlers_synchronous.cpp +++ b/src/mongo/util/signal_handlers_synchronous.cpp @@ -56,7 +56,6 @@ #include "mongo/util/debugger.h" #include "mongo/util/exception_filter_win32.h" #include "mongo/util/exit_code.h" -#include "mongo/util/log.h" #include "mongo/util/quick_exit.h" #include "mongo/util/signal_handlers.h" #include "mongo/util/stacktrace.h" diff --git a/src/mongo/util/stacktrace_somap.cpp b/src/mongo/util/stacktrace_somap.cpp index ed413603142..3c8557aa02e 100644 --- a/src/mongo/util/stacktrace_somap.cpp +++ b/src/mongo/util/stacktrace_somap.cpp @@ -52,8 +52,8 @@ #include "mongo/base/init.h" #include "mongo/bson/bsonobjbuilder.h" #include "mongo/db/jsobj.h" +#include "mongo/logv2/log.h" #include "mongo/util/hex.h" -#include "mongo/util/log.h" #include "mongo/util/str.h" #include "mongo/util/version.h" @@ -147,20 +147,31 @@ void processLoadSegment(const dl_phdr_info& info, const ElfW(Phdr) & phdr, BSONO std::string quotedFileName = "\"" + str::escape(info.dlpi_name) + "\""; if (memcmp(&eHeader.e_ident[0], ELFMAG, SELFMAG)) { - warning() << "Bad ELF magic number in image of " << quotedFileName; + LOGV2_WARNING(23842, + "Bad ELF magic number in image of {quotedFileName}", + "quotedFileName"_attr = quotedFileName); return; } static constexpr int kArchBits = ARCH_BITS; if (eHeader.e_ident[EI_CLASS] != ARCH_ELFCLASS) { - warning() << "Expected elf file class of " << quotedFileName << " to be " << ARCH_ELFCLASS - << "(" << kArchBits << "-bit), but found " << int(eHeader.e_ident[4]); + LOGV2_WARNING(23843, + "Expected elf file class of {quotedFileName} to be " + "{ARCH_ELFCLASS}({kArchBits}-bit), but found {int_eHeader_e_ident_4}", + "quotedFileName"_attr = quotedFileName, + "ARCH_ELFCLASS"_attr = ARCH_ELFCLASS, + "kArchBits"_attr = kArchBits, + "int_eHeader_e_ident_4"_attr = int(eHeader.e_ident[4])); return; } if (eHeader.e_ident[EI_VERSION] != EV_CURRENT) { - warning() << "Wrong ELF version in " << quotedFileName << ". Expected " << EV_CURRENT - << " but found " << int(eHeader.e_ident[EI_VERSION]); + LOGV2_WARNING(23844, + "Wrong ELF version in {quotedFileName}. Expected {EV_CURRENT} but found " + "{int_eHeader_e_ident_EI_VERSION}", + "quotedFileName"_attr = quotedFileName, + "EV_CURRENT"_attr = EV_CURRENT, + "int_eHeader_e_ident_EI_VERSION"_attr = int(eHeader.e_ident[EI_VERSION])); return; } @@ -172,8 +183,10 @@ void processLoadSegment(const dl_phdr_info& info, const ElfW(Phdr) & phdr, BSONO case ET_DYN: return; default: - warning() << "Surprised to find " << quotedFileName << " is ELF file of type " - << eHeader.e_type; + LOGV2_WARNING(23845, + "Surprised to find {quotedFileName} is ELF file of type {eHeader_e_type}", + "quotedFileName"_attr = quotedFileName, + "eHeader_e_type"_attr = eHeader.e_type); return; } diff --git a/src/mongo/util/stacktrace_test.cpp b/src/mongo/util/stacktrace_test.cpp index 7fb200382a2..b1d4d3b5986 100644 --- a/src/mongo/util/stacktrace_test.cpp +++ b/src/mongo/util/stacktrace_test.cpp @@ -54,7 +54,6 @@ #include "mongo/stdx/condition_variable.h" #include "mongo/stdx/thread.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" #include "mongo/util/stacktrace.h" #include "mongo/util/stacktrace_json.h" diff --git a/src/mongo/util/stacktrace_threads.cpp b/src/mongo/util/stacktrace_threads.cpp index 139c865acd5..7c36e68f592 100644 --- a/src/mongo/util/stacktrace_threads.cpp +++ b/src/mongo/util/stacktrace_threads.cpp @@ -59,7 +59,6 @@ #include "mongo/stdx/mutex.h" #include "mongo/stdx/thread.h" #include "mongo/stdx/unordered_map.h" -#include "mongo/util/log.h" #include "mongo/util/signal_handlers_synchronous.h" #include "mongo/util/stacktrace_json.h" #include "mongo/util/stacktrace_somap.h" diff --git a/src/mongo/util/stacktrace_windows.cpp b/src/mongo/util/stacktrace_windows.cpp index 7ad19c931c0..582c8921ff2 100644 --- a/src/mongo/util/stacktrace_windows.cpp +++ b/src/mongo/util/stacktrace_windows.cpp @@ -50,6 +50,7 @@ #include #include "mongo/base/init.h" +#include "mongo/stdx/mutex.h" #include "mongo/util/assert_util.h" #include "mongo/util/concurrency/mutex.h" #include "mongo/util/log.h" diff --git a/src/mongo/util/string_map_test.cpp b/src/mongo/util/string_map_test.cpp index 24bae71587c..4e8eb3d27f7 100644 --- a/src/mongo/util/string_map_test.cpp +++ b/src/mongo/util/string_map_test.cpp @@ -32,7 +32,6 @@ #include "mongo/unittest/unittest.h" #include "mongo/platform/random.h" -#include "mongo/util/log.h" #include "mongo/util/string_map.h" #include "mongo/util/timer.h" diff --git a/src/mongo/util/tcmalloc_server_status_section.cpp b/src/mongo/util/tcmalloc_server_status_section.cpp index 2f3f915016f..8897c15ae49 100644 --- a/src/mongo/util/tcmalloc_server_status_section.cpp +++ b/src/mongo/util/tcmalloc_server_status_section.cpp @@ -42,7 +42,6 @@ #include "mongo/db/commands/server_status.h" #include "mongo/db/service_context.h" #include "mongo/transport/service_entry_point.h" -#include "mongo/util/log.h" #include "mongo/util/tcmalloc_parameters_gen.h" namespace mongo { diff --git a/src/mongo/util/time_support_test.cpp b/src/mongo/util/time_support_test.cpp index b0005e1b178..e5d2e554060 100644 --- a/src/mongo/util/time_support_test.cpp +++ b/src/mongo/util/time_support_test.cpp @@ -35,7 +35,7 @@ #include "mongo/base/init.h" #include "mongo/unittest/unittest.h" -#include "mongo/util/log.h" +#include "mongo/util/errno_util.h" #include "mongo/util/time_support.h" namespace mongo { diff --git a/src/mongo/util/version.cpp b/src/mongo/util/version.cpp index eefe9fb4131..b589d67c257 100644 --- a/src/mongo/util/version.cpp +++ b/src/mongo/util/version.cpp @@ -48,7 +48,6 @@ #include "mongo/db/jsobj.h" #include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" namespace mongo { namespace { diff --git a/src/mongo/util/version_impl.cpp b/src/mongo/util/version_impl.cpp index cfd68435489..27ae1706caf 100644 --- a/src/mongo/util/version_impl.cpp +++ b/src/mongo/util/version_impl.cpp @@ -34,8 +34,8 @@ #include "mongo/util/version.h" #include "mongo/base/init.h" +#include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" -#include "mongo/util/log.h" #define MONGO_UTIL_VERSION_CONSTANTS_H_WHITELISTED #include "mongo/util/version_constants.h" @@ -89,7 +89,7 @@ public: #error This targeted Windows version is not supported #endif // NTDDI_VERSION #else - severe() << "VersionInfoInterface::targetMinOS is only available for Windows"; + LOGV2_FATAL(23868, "VersionInfoInterface::targetMinOS is only available for Windows"); fassertFailed(40277); #endif } diff --git a/src/mongo/watchdog/watchdog.cpp b/src/mongo/watchdog/watchdog.cpp index cbd6e2df39a..97d861fc43f 100644 --- a/src/mongo/watchdog/watchdog.cpp +++ b/src/mongo/watchdog/watchdog.cpp @@ -51,7 +51,6 @@ #include "mongo/util/exit.h" #include "mongo/util/exit_code.h" #include "mongo/util/hex.h" -#include "mongo/util/log.h" #include "mongo/util/timer.h" diff --git a/src/mongo/watchdog/watchdog_mongod.cpp b/src/mongo/watchdog/watchdog_mongod.cpp index f473b1fedea..5d47f72ec64 100644 --- a/src/mongo/watchdog/watchdog_mongod.cpp +++ b/src/mongo/watchdog/watchdog_mongod.cpp @@ -47,7 +47,6 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/clock_source.h" #include "mongo/util/clock_source_mock.h" -#include "mongo/util/log.h" #include "mongo/util/tick_source_mock.h" #include "mongo/watchdog/watchdog.h" #include "mongo/watchdog/watchdog_mongod_gen.h" diff --git a/src/mongo/watchdog/watchdog_test.cpp b/src/mongo/watchdog/watchdog_test.cpp index 02795b57481..49cf6a35fa4 100644 --- a/src/mongo/watchdog/watchdog_test.cpp +++ b/src/mongo/watchdog/watchdog_test.cpp @@ -44,7 +44,6 @@ #include "mongo/unittest/unittest.h" #include "mongo/util/clock_source.h" #include "mongo/util/clock_source_mock.h" -#include "mongo/util/log.h" #include "mongo/util/tick_source_mock.h" namespace mongo { -- cgit v1.2.1