diff options
author | Gabriel Russell <gabriel.russell@mongodb.com> | 2020-02-13 11:49:46 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-13 18:16:35 +0000 |
commit | a84c09a19720b73cedb2e8ef7c5cfeedfa1c9761 (patch) | |
tree | 85ac46cd5f4ea6d5134560bf764fb9e6cf11fe4e /src/mongo/db/repl/database_cloner.cpp | |
parent | 6df40e01f7b6899affc4536e7e73a35802cabf98 (diff) | |
download | mongo-a84c09a19720b73cedb2e8ef7c5cfeedfa1c9761.tar.gz |
SERVER-45869 automatically converted structured logging
Diffstat (limited to 'src/mongo/db/repl/database_cloner.cpp')
-rw-r--r-- | src/mongo/db/repl/database_cloner.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/mongo/db/repl/database_cloner.cpp b/src/mongo/db/repl/database_cloner.cpp index d896ee08d0e..5dbabe1cb92 100644 --- a/src/mongo/db/repl/database_cloner.cpp +++ b/src/mongo/db/repl/database_cloner.cpp @@ -35,6 +35,7 @@ #include "mongo/db/commands/list_collections_filter.h" #include "mongo/db/repl/database_cloner.h" #include "mongo/db/repl/database_cloner_gen.h" +#include "mongo/logv2/log.h" #include "mongo/util/assert_util.h" #include "mongo/util/log.h" @@ -88,10 +89,13 @@ BaseCloner::AfterStageBehavior DatabaseCloner::listCollectionsStage() { } NamespaceString collectionNamespace(_dbName, result.getName()); if (collectionNamespace.isSystem() && !collectionNamespace.isLegalClientSystemNS()) { - LOG(1) << "Skipping 'system' collection: " << collectionNamespace.ns(); + LOGV2_DEBUG(21146, + 1, + "Skipping 'system' collection: {collectionNamespace_ns}", + "collectionNamespace_ns"_attr = collectionNamespace.ns()); continue; } - LOG(2) << "Allowing cloning of collectionInfo: " << info; + LOGV2_DEBUG(21147, 2, "Allowing cloning of collectionInfo: {info}", "info"_attr = info); bool isDuplicate = seen.insert(result.getName().toString()).second; uassert(51005, @@ -137,10 +141,13 @@ void DatabaseCloner::postStage() { } auto collStatus = _currentCollectionCloner->run(); if (collStatus.isOK()) { - LOG(1) << "collection clone finished: " << sourceNss; + LOGV2_DEBUG( + 21148, 1, "collection clone finished: {sourceNss}", "sourceNss"_attr = sourceNss); } else { - error() << "collection clone for '" << sourceNss << "' failed due to " - << collStatus.toString(); + LOGV2_ERROR(21149, + "collection clone for '{sourceNss}' failed due to {collStatus}", + "sourceNss"_attr = sourceNss, + "collStatus"_attr = collStatus.toString()); setInitialSyncFailedStatus( {ErrorCodes::InitialSyncFailure, collStatus |