summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/replication_recovery.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/replication_recovery.cpp')
-rw-r--r--src/mongo/db/repl/replication_recovery.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/mongo/db/repl/replication_recovery.cpp b/src/mongo/db/repl/replication_recovery.cpp
index 443f5414760..82c406dc480 100644
--- a/src/mongo/db/repl/replication_recovery.cpp
+++ b/src/mongo/db/repl/replication_recovery.cpp
@@ -26,7 +26,7 @@
* 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::kReplication
+#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kReplication
#define LOGV2_FOR_RECOVERY(ID, DLEVEL, MESSAGE, ...) \
LOGV2_DEBUG_OPTIONS(ID, DLEVEL, {logv2::LogComponent::kStorageRecovery}, MESSAGE, ##__VA_ARGS__)
@@ -60,10 +60,8 @@ namespace repl {
namespace {
-const auto kRecoveryBatchLogLevel = logger::LogSeverity::Debug(2);
-const auto kRecoveryOperationLogLevel = logger::LogSeverity::Debug(3);
-const auto kRecoveryBatchLogLevelV2 = logv2::LogSeverity::Debug(2);
-const auto kRecoveryOperationLogLevelV2 = logv2::LogSeverity::Debug(3);
+const auto kRecoveryBatchLogLevel = logv2::LogSeverity::Debug(2);
+const auto kRecoveryOperationLogLevel = logv2::LogSeverity::Debug(3);
/**
* Tracks and logs operations applied during recovery.
@@ -73,7 +71,7 @@ public:
void onBatchBegin(const std::vector<OplogEntry>& batch) final {
_numBatches++;
LOGV2_FOR_RECOVERY(24098,
- logSeverityV1toV2(kRecoveryBatchLogLevel).toInt(),
+ kRecoveryBatchLogLevel.toInt(),
"Applying operations in batch: {numBatches}({batchSize} operations "
"from {firstOpTime} (inclusive) to {lastOpTime} "
"(inclusive)). Operations applied so far: {numOpsApplied}",
@@ -85,13 +83,12 @@ public:
"numOpsApplied"_attr = _numOpsApplied);
_numOpsApplied += batch.size();
- if (shouldLog(::mongo::logv2::LogComponent::kStorageRecovery,
- kRecoveryOperationLogLevelV2)) {
+ if (shouldLog(::mongo::logv2::LogComponent::kStorageRecovery, kRecoveryOperationLogLevel)) {
std::size_t i = 0;
for (const auto& entry : batch) {
i++;
LOGV2_FOR_RECOVERY(24099,
- logSeverityV1toV2(kRecoveryOperationLogLevel).toInt(),
+ kRecoveryOperationLogLevel.toInt(),
"Applying op {opIndex} of {batchSize} (in batch {numBatches}) "
"during replication "
"recovery: {oplogEntry}",