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/catalog/drop_collection.cpp | |
parent | 6df40e01f7b6899affc4536e7e73a35802cabf98 (diff) | |
download | mongo-a84c09a19720b73cedb2e8ef7c5cfeedfa1c9761.tar.gz |
SERVER-45869 automatically converted structured logging
Diffstat (limited to 'src/mongo/db/catalog/drop_collection.cpp')
-rw-r--r-- | src/mongo/db/catalog/drop_collection.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/mongo/db/catalog/drop_collection.cpp b/src/mongo/db/catalog/drop_collection.cpp index f973c1257bd..1f18d42eec0 100644 --- a/src/mongo/db/catalog/drop_collection.cpp +++ b/src/mongo/db/catalog/drop_collection.cpp @@ -45,6 +45,7 @@ #include "mongo/db/server_options.h" #include "mongo/db/service_context.h" #include "mongo/db/views/view_catalog.h" +#include "mongo/logv2/log.h" #include "mongo/util/fail_point.h" #include "mongo/util/log.h" @@ -74,8 +75,9 @@ Status _dropView(OperationContext* opCtx, Lock::CollectionLock systemViewsLock(opCtx, db->getSystemViewsName(), MODE_X); if (MONGO_unlikely(hangDuringDropCollection.shouldFail())) { - log() << "hangDuringDropCollection fail point enabled. Blocking until fail point is " - "disabled."; + LOGV2(20330, + "hangDuringDropCollection fail point enabled. Blocking until fail point is " + "disabled."); hangDuringDropCollection.pauseWhileSet(); } @@ -116,8 +118,9 @@ Status _dropCollection(OperationContext* opCtx, } if (MONGO_unlikely(hangDuringDropCollection.shouldFail())) { - log() << "hangDuringDropCollection fail point enabled. Blocking until fail point is " - "disabled."; + LOGV2(20331, + "hangDuringDropCollection fail point enabled. Blocking until fail point is " + "disabled."); hangDuringDropCollection.pauseWhileSet(); } @@ -160,11 +163,11 @@ Status dropCollection(OperationContext* opCtx, const repl::OpTime& dropOpTime, DropCollectionSystemCollectionMode systemCollectionMode) { if (!serverGlobalParams.quiet.load()) { - log() << "CMD: drop " << collectionName; + LOGV2(20332, "CMD: drop {collectionName}", "collectionName"_attr = collectionName); } if (MONGO_unlikely(hangDropCollectionBeforeLockAcquisition.shouldFail())) { - log() << "Hanging drop collection before lock acquisition while fail point is set"; + LOGV2(20333, "Hanging drop collection before lock acquisition while fail point is set"); hangDropCollectionBeforeLockAcquisition.pauseWhileSet(); } return writeConflictRetry(opCtx, "drop", collectionName.ns(), [&] { |