diff options
author | Benety Goh <benety@mongodb.com> | 2014-06-27 10:15:15 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2014-07-01 15:32:29 -0400 |
commit | f8c98bee1208e04259814e0818f405081132d42c (patch) | |
tree | 6859a21e564d965ae839975284122128179e5808 /src/mongo/db/repl | |
parent | 44c3347251e39b1a04717e02cec4a7ff626baf4e (diff) | |
download | mongo-f8c98bee1208e04259814e0818f405081132d42c.tar.gz |
SERVER-5092 assign default log component to server modules
Diffstat (limited to 'src/mongo/db/repl')
-rw-r--r-- | src/mongo/db/repl/bgsync.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/repl/consensus.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/repl/manager.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/repl/master_slave.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/repl/multicmd.h | 3 | ||||
-rw-r--r-- | src/mongo/db/repl/oplog.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/repl/oplog.h | 3 | ||||
-rw-r--r-- | src/mongo/db/repl/oplogreader.cpp | 5 | ||||
-rw-r--r-- | src/mongo/db/repl/repl_coordinator_legacy.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/repl/repl_set_health_poll_task.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/repl/repl_set_impl.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/repl/repl_set_seed_list.cpp | 5 | ||||
-rw-r--r-- | src/mongo/db/repl/rs_config.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/repl/rs_initialsync.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/repl/rs_rollback.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/repl/sync.cpp | 5 | ||||
-rw-r--r-- | src/mongo/db/repl/sync_source_feedback.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/repl/sync_source_feedback.h | 3 | ||||
-rw-r--r-- | src/mongo/db/repl/sync_tail.cpp | 6 | ||||
-rw-r--r-- | src/mongo/db/repl/topology_coordinator_impl.cpp | 6 |
20 files changed, 100 insertions, 6 deletions
diff --git a/src/mongo/db/repl/bgsync.cpp b/src/mongo/db/repl/bgsync.cpp index 0922a1cc5e2..c5fd835c650 100644 --- a/src/mongo/db/repl/bgsync.cpp +++ b/src/mongo/db/repl/bgsync.cpp @@ -26,7 +26,7 @@ * it in the license file. */ -#include "mongo/pch.h" +#include "mongo/platform/basic.h" #include "mongo/db/client.h" #include "mongo/db/commands/fsync.h" @@ -36,10 +36,14 @@ #include "mongo/db/repl/rs_sync.h" #include "mongo/db/repl/rs.h" #include "mongo/util/fail_point_service.h" +#include "mongo/util/log.h" #include "mongo/base/counter.h" #include "mongo/db/stats/timer_stats.h" namespace mongo { + + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kReplication); + namespace repl { int SleepToAllowBatchingMillis = 2; diff --git a/src/mongo/db/repl/consensus.cpp b/src/mongo/db/repl/consensus.cpp index f47984b2d67..dad5aa3f4fd 100644 --- a/src/mongo/db/repl/consensus.cpp +++ b/src/mongo/db/repl/consensus.cpp @@ -26,6 +26,8 @@ * it in the license file. */ +#include "mongo/platform/basic.h" + #include "mongo/db/repl/consensus.h" #include "mongo/base/string_data.h" @@ -33,8 +35,12 @@ #include "mongo/db/repl/multicmd.h" #include "mongo/db/repl/repl_coordinator_global.h" #include "mongo/db/repl/replset_commands.h" +#include "mongo/util/log.h" namespace mongo { + + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kReplication); + namespace repl { /** the first cmd called by a node seeking election and it's a basic sanity diff --git a/src/mongo/db/repl/manager.cpp b/src/mongo/db/repl/manager.cpp index b47c9e26a0a..68559ca4ffc 100644 --- a/src/mongo/db/repl/manager.cpp +++ b/src/mongo/db/repl/manager.cpp @@ -29,14 +29,18 @@ * it in the license file. */ -#include "mongo/db/repl/manager.h" +#include "mongo/platform/basic.h" #include "mongo/db/repl/connections.h" #include "mongo/db/repl/isself.h" #include "mongo/db/repl/rs.h" #include "mongo/db/client.h" +#include "mongo/util/log.h" namespace mongo { + + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kReplication); + namespace repl { /* check members OTHER THAN US to see if they think they are primary */ diff --git a/src/mongo/db/repl/master_slave.cpp b/src/mongo/db/repl/master_slave.cpp index 3199c82d4db..54afae7e969 100644 --- a/src/mongo/db/repl/master_slave.cpp +++ b/src/mongo/db/repl/master_slave.cpp @@ -36,6 +36,8 @@ local.pair.sync - [deprecated] { initialsynccomplete: 1 } */ +#include "mongo/platform/basic.h" + #include "mongo/db/repl/master_slave.h" #include <pcrecpp.h> @@ -57,8 +59,12 @@ #include "mongo/db/operation_context_impl.h" #include "mongo/db/storage_options.h" #include "mongo/util/exit.h" +#include "mongo/util/log.h" namespace mongo { + + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kReplication); + namespace repl { void pretouchOperation(OperationContext* txn, const BSONObj& op); diff --git a/src/mongo/db/repl/multicmd.h b/src/mongo/db/repl/multicmd.h index d07337a0074..7848040836a 100644 --- a/src/mongo/db/repl/multicmd.h +++ b/src/mongo/db/repl/multicmd.h @@ -32,6 +32,7 @@ #include "mongo/db/repl/connections.h" #include "mongo/util/background.h" +#include "mongo/util/log.h" namespace mongo { namespace repl { @@ -61,6 +62,8 @@ namespace repl { private: std::string name() const { return "MultiCommandJob"; } void run() { + MONGO_LOG_DEFAULT_COMPONENT_LOCAL(::mongo::logger::LogComponent::kReplication); + try { ScopedConn c(d.toHost); LOG(1) << "multiCommand running on host " << d.toHost; diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp index 5206c3f613b..db1919151e5 100644 --- a/src/mongo/db/repl/oplog.cpp +++ b/src/mongo/db/repl/oplog.cpp @@ -28,7 +28,7 @@ * it in the license file. */ -#include "mongo/pch.h" +#include "mongo/platform/basic.h" #include "mongo/db/repl/oplog.h" @@ -63,9 +63,13 @@ #include "mongo/scripting/engine.h" #include "mongo/util/elapsed_tracker.h" #include "mongo/util/file.h" +#include "mongo/util/log.h" #include "mongo/util/startup_test.h" namespace mongo { + + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kReplication); + namespace repl { // cached copies of these...so don't rename them, drop them, etc.!!! diff --git a/src/mongo/db/repl/oplog.h b/src/mongo/db/repl/oplog.h index 3aa0eb0ba52..ab9c5faa132 100644 --- a/src/mongo/db/repl/oplog.h +++ b/src/mongo/db/repl/oplog.h @@ -28,6 +28,9 @@ #pragma once +#include <cstddef> +#include <string> + namespace mongo { class BSONObj; class Database; diff --git a/src/mongo/db/repl/oplogreader.cpp b/src/mongo/db/repl/oplogreader.cpp index 13e1f1519e3..3963fe3a665 100644 --- a/src/mongo/db/repl/oplogreader.cpp +++ b/src/mongo/db/repl/oplogreader.cpp @@ -26,6 +26,8 @@ * it in the license file. */ +#include "mongo/platform/basic.h" + #include "mongo/db/repl/oplogreader.h" #include <boost/shared_ptr.hpp> @@ -45,6 +47,9 @@ #include "mongo/util/log.h" namespace mongo { + + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kReplication); + namespace repl { //number of readers created; diff --git a/src/mongo/db/repl/repl_coordinator_legacy.cpp b/src/mongo/db/repl/repl_coordinator_legacy.cpp index 0fd61d04e27..eb246e9e740 100644 --- a/src/mongo/db/repl/repl_coordinator_legacy.cpp +++ b/src/mongo/db/repl/repl_coordinator_legacy.cpp @@ -50,8 +50,12 @@ #include "mongo/db/write_concern_options.h" #include "mongo/util/assert_util.h" #include "mongo/util/fail_point_service.h" +#include "mongo/util/log.h" namespace mongo { + + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kReplication); + namespace repl { LegacyReplicationCoordinator::LegacyReplicationCoordinator() { diff --git a/src/mongo/db/repl/repl_set_health_poll_task.cpp b/src/mongo/db/repl/repl_set_health_poll_task.cpp index 9c2b39c1af4..f1988db61dd 100644 --- a/src/mongo/db/repl/repl_set_health_poll_task.cpp +++ b/src/mongo/db/repl/repl_set_health_poll_task.cpp @@ -26,6 +26,8 @@ * it in the license file. */ +#include "mongo/platform/basic.h" + #include "mongo/db/repl/repl_set_health_poll_task.h" #include "mongo/bson/bsonelement.h" @@ -35,8 +37,12 @@ #include "mongo/db/repl/member.h" #include "mongo/db/repl/rs.h" #include "mongo/db/repl/rs_config.h" +#include "mongo/util/log.h" namespace mongo { + + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kReplication); + namespace repl { int ReplSetHealthPollTask::s_try_offset = 0; diff --git a/src/mongo/db/repl/repl_set_impl.cpp b/src/mongo/db/repl/repl_set_impl.cpp index 1cedecf0880..6ede275b985 100644 --- a/src/mongo/db/repl/repl_set_impl.cpp +++ b/src/mongo/db/repl/repl_set_impl.cpp @@ -26,6 +26,8 @@ * it in the license file. */ +#include "mongo/platform/basic.h" + #include "mongo/db/repl/repl_set_impl.h" #include "mongo/db/client.h" @@ -43,8 +45,12 @@ #include "mongo/s/d_logic.h" #include "mongo/util/background.h" #include "mongo/util/exit.h" +#include "mongo/util/log.h" namespace mongo { + + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kReplication); + namespace repl { #ifdef MONGO_PLATFORM_64 const int ReplSetImpl::replWriterThreadCount = 16; diff --git a/src/mongo/db/repl/repl_set_seed_list.cpp b/src/mongo/db/repl/repl_set_seed_list.cpp index 29373665f31..dfd1c4f7bda 100644 --- a/src/mongo/db/repl/repl_set_seed_list.cpp +++ b/src/mongo/db/repl/repl_set_seed_list.cpp @@ -26,6 +26,8 @@ * it in the license file. */ +#include "mongo/platform/basic.h" + #include "mongo/db/repl/repl_set_seed_list.h" #include <boost/thread.hpp> @@ -41,6 +43,9 @@ #include "mongo/util/log.h" namespace mongo { + + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kReplication); + namespace repl { /** @param cfgString <setname>/<seedhost1>,<seedhost2> */ diff --git a/src/mongo/db/repl/rs_config.cpp b/src/mongo/db/repl/rs_config.cpp index b92e665b2b1..d62f32e601f 100644 --- a/src/mongo/db/repl/rs_config.cpp +++ b/src/mongo/db/repl/rs_config.cpp @@ -28,6 +28,8 @@ * it in the license file. */ +#include "mongo/platform/basic.h" + #include <boost/algorithm/string.hpp> #include "mongo/db/dbhelpers.h" @@ -39,12 +41,16 @@ #include "mongo/db/repl/repl_settings.h" // replSettings #include "mongo/db/repl/rs.h" #include "mongo/db/operation_context_impl.h" +#include "mongo/util/log.h" #include "mongo/util/net/hostandport.h" #include "mongo/util/text.h" using namespace bson; namespace mongo { + + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kReplication); + namespace repl { mongo::mutex ReplSetConfig::groupMx("RS tag group"); diff --git a/src/mongo/db/repl/rs_initialsync.cpp b/src/mongo/db/repl/rs_initialsync.cpp index b685325a1c4..e41a22f6064 100644 --- a/src/mongo/db/repl/rs_initialsync.cpp +++ b/src/mongo/db/repl/rs_initialsync.cpp @@ -26,7 +26,7 @@ * it in the license file. */ -#include "mongo/pch.h" +#include "mongo/platform/basic.h" #include "mongo/db/repl/rs.h" @@ -45,9 +45,13 @@ #include "mongo/db/repl/oplog.h" #include "mongo/db/repl/oplogreader.h" #include "mongo/db/repl/repl_settings.h" // replSettings +#include "mongo/util/log.h" #include "mongo/util/mongoutils/str.h" namespace mongo { + + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kReplication); + namespace repl { using namespace mongoutils; diff --git a/src/mongo/db/repl/rs_rollback.cpp b/src/mongo/db/repl/rs_rollback.cpp index b338a9e2c40..321885f60d7 100644 --- a/src/mongo/db/repl/rs_rollback.cpp +++ b/src/mongo/db/repl/rs_rollback.cpp @@ -27,7 +27,7 @@ * it in the license file. */ -#include "mongo/pch.h" +#include "mongo/platform/basic.h" #include "mongo/db/auth/authorization_manager.h" #include "mongo/db/auth/authorization_manager_global.h" @@ -43,6 +43,7 @@ #include "mongo/db/repl/repl_coordinator_global.h" #include "mongo/db/repl/rs.h" #include "mongo/db/operation_context_impl.h" +#include "mongo/util/log.h" /* Scenarios * @@ -83,6 +84,9 @@ */ namespace mongo { + + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kReplication); + namespace repl { using namespace bson; diff --git a/src/mongo/db/repl/sync.cpp b/src/mongo/db/repl/sync.cpp index a112603aed0..93647531919 100644 --- a/src/mongo/db/repl/sync.cpp +++ b/src/mongo/db/repl/sync.cpp @@ -26,6 +26,8 @@ * it in the license file. */ +#include "mongo/platform/basic.h" + #include "mongo/db/repl/sync.h" #include <string> @@ -40,6 +42,9 @@ #include "mongo/util/log.h" namespace mongo { + + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kReplication); + namespace repl { void Sync::setHostname(const string& hostname) { diff --git a/src/mongo/db/repl/sync_source_feedback.cpp b/src/mongo/db/repl/sync_source_feedback.cpp index 0062fe20f20..68d94d1318a 100644 --- a/src/mongo/db/repl/sync_source_feedback.cpp +++ b/src/mongo/db/repl/sync_source_feedback.cpp @@ -26,6 +26,8 @@ * it in the license file. */ +#include "mongo/platform/basic.h" + #include "mongo/db/repl/sync_source_feedback.h" #include "mongo/client/constants.h" @@ -38,8 +40,12 @@ #include "mongo/db/repl/bgsync.h" #include "mongo/db/repl/rs.h" // theReplSet #include "mongo/db/operation_context_impl.h" +#include "mongo/util/log.h" namespace mongo { + + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kReplication); + namespace repl { // used in replAuthenticate diff --git a/src/mongo/db/repl/sync_source_feedback.h b/src/mongo/db/repl/sync_source_feedback.h index 943d4a14cce..927eeca0428 100644 --- a/src/mongo/db/repl/sync_source_feedback.h +++ b/src/mongo/db/repl/sync_source_feedback.h @@ -33,6 +33,7 @@ #include "mongo/client/constants.h" #include "mongo/client/dbclientcursor.h" #include "mongo/util/background.h" +#include "mongo/util/log.h" namespace mongo { namespace repl { @@ -71,6 +72,8 @@ namespace repl { private: void _resetConnection() { + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kReplication); + LOG(1) << "resetting connection in sync source feedback"; _connection.reset(); } diff --git a/src/mongo/db/repl/sync_tail.cpp b/src/mongo/db/repl/sync_tail.cpp index 569ea8f7f0a..7665c995102 100644 --- a/src/mongo/db/repl/sync_tail.cpp +++ b/src/mongo/db/repl/sync_tail.cpp @@ -26,7 +26,7 @@ * it in the license file. */ -#include "mongo/pch.h" +#include "mongo/platform/basic.h" #include "mongo/db/repl/sync_tail.h" @@ -42,8 +42,12 @@ #include "mongo/db/stats/timer_stats.h" #include "mongo/db/operation_context_impl.h" #include "mongo/util/fail_point_service.h" +#include "mongo/util/log.h" namespace mongo { + + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kReplication); + namespace repl { static Counter64 opsAppliedStats; diff --git a/src/mongo/db/repl/topology_coordinator_impl.cpp b/src/mongo/db/repl/topology_coordinator_impl.cpp index dfc89bf10f4..126461ca1ad 100644 --- a/src/mongo/db/repl/topology_coordinator_impl.cpp +++ b/src/mongo/db/repl/topology_coordinator_impl.cpp @@ -26,6 +26,8 @@ * it in the license file. */ +#include "mongo/platform/basic.h" + #include "mongo/db/repl/topology_coordinator_impl.h" #include "mongo/db/operation_context.h" @@ -34,8 +36,12 @@ #include "mongo/db/repl/repl_settings.h" #include "mongo/db/repl/replication_executor.h" #include "mongo/db/repl/rs_sync.h" // maxSyncSourceLagSecs +#include "mongo/util/log.h" namespace mongo { + + MONGO_LOG_DEFAULT_COMPONENT_FILE(::mongo::logger::LogComponent::kReplication); + namespace repl { TopologyCoordinatorImpl::TopologyCoordinatorImpl() : |