diff options
author | James Wahlin <james.wahlin@10gen.com> | 2015-12-21 13:42:21 -0500 |
---|---|---|
committer | James Wahlin <james.wahlin@10gen.com> | 2015-12-30 10:34:12 -0500 |
commit | 066f12fd7dd801114d08c4c25b6683aa4653408f (patch) | |
tree | 50a2610d735cf31a42342511f66673a2c7c33ac7 | |
parent | 7049bf74599e186c7cc880649217680830e198c4 (diff) | |
download | mongo-066f12fd7dd801114d08c4c25b6683aa4653408f.tar.gz |
SERVER-20083 Log index filter change at default level
(cherry picked from commit dbd58e06914b23ed50605820515f3849baf2cbce)
-rw-r--r-- | src/mongo/db/commands/index_filter_commands.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mongo/db/commands/index_filter_commands.cpp b/src/mongo/db/commands/index_filter_commands.cpp index c04bd6a5718..70ba386da3d 100644 --- a/src/mongo/db/commands/index_filter_commands.cpp +++ b/src/mongo/db/commands/index_filter_commands.cpp @@ -26,6 +26,8 @@ * it in the license file. */ +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kQuery + #include "mongo/platform/basic.h" #include <boost/scoped_ptr.hpp> @@ -43,7 +45,7 @@ #include "mongo/db/commands/index_filter_commands.h" #include "mongo/db/commands/plan_cache_commands.h" #include "mongo/db/catalog/collection.h" - +#include "mongo/util/log.h" namespace { @@ -280,6 +282,9 @@ Status ClearFilters::clear(OperationContext* txn, // Remove entry from plan cache planCache->remove(*cq); + + LOG(0) << "Removed index filter on " << ns << " " << cq->toStringShort(); + return Status::OK(); } @@ -326,6 +331,8 @@ Status ClearFilters::clear(OperationContext* txn, planCache->remove(*cq); } + LOG(0) << "Removed all index filters for collection: " << ns; + return Status::OK(); } @@ -398,6 +405,8 @@ Status SetFilter::set(OperationContext* txn, // Remove entry from plan cache. planCache->remove(*cq); + LOG(0) << "Index filter set on " << ns << " " << cq->toStringShort() << " " << indexesElt; + return Status::OK(); } |