summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Wahlin <james.wahlin@10gen.com>2015-12-21 13:42:21 -0500
committerJames Wahlin <james.wahlin@10gen.com>2015-12-29 15:48:46 -0500
commitdbd58e06914b23ed50605820515f3849baf2cbce (patch)
tree9353151960ab5dd05a125daed54877e8ca8ab95d
parent706d2e0a94c57d5c4a01a4787d78d413f134441e (diff)
downloadmongo-dbd58e06914b23ed50605820515f3849baf2cbce.tar.gz
SERVER-20083 Log index filter change at default level
-rw-r--r--src/mongo/db/commands/index_filter_commands.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/commands/index_filter_commands.cpp b/src/mongo/db/commands/index_filter_commands.cpp
index a02ca782417..5dee23e4385 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 <string>
@@ -44,6 +46,7 @@
#include "mongo/db/jsobj.h"
#include "mongo/db/matcher/expression_parser.h"
#include "mongo/db/matcher/extensions_callback_real.h"
+#include "mongo/util/log.h"
namespace {
@@ -279,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();
}
@@ -324,6 +330,8 @@ Status ClearFilters::clear(OperationContext* txn,
planCache->remove(*cq);
}
+ LOG(0) << "Removed all index filters for collection: " << ns;
+
return Status::OK();
}
@@ -395,6 +403,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();
}