diff options
author | Gabriel Russell <gabriel.russell@mongodb.com> | 2020-02-20 16:05:48 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-21 20:12:44 +0000 |
commit | 0f7625b5cdbc24ed0fce1e168059118cb025d869 (patch) | |
tree | 3ea90b71ed2510e220140626b351f6e998d2d8b7 /src/mongo/db/commands/plan_cache_clear_command.cpp | |
parent | 3463ea25afcbf2c07b96f043904961b5c0f04474 (diff) | |
download | mongo-0f7625b5cdbc24ed0fce1e168059118cb025d869.tar.gz |
SERVER-45567 removing util/log.h where I can
o converting some log lines that were missed
o fixing some missing includes
create mode 100644 src/mongo/transport/ismaster_metrics.cpp
Diffstat (limited to 'src/mongo/db/commands/plan_cache_clear_command.cpp')
-rw-r--r-- | src/mongo/db/commands/plan_cache_clear_command.cpp | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/src/mongo/db/commands/plan_cache_clear_command.cpp b/src/mongo/db/commands/plan_cache_clear_command.cpp index 5eb139aeddf..be77a812338 100644 --- a/src/mongo/db/commands/plan_cache_clear_command.cpp +++ b/src/mongo/db/commands/plan_cache_clear_command.cpp @@ -42,7 +42,7 @@ #include "mongo/db/namespace_string.h" #include "mongo/db/query/collection_query_info.h" #include "mongo/db/query/plan_ranker.h" -#include "mongo/util/log.h" +#include "mongo/logv2/log.h" namespace mongo { namespace { @@ -79,17 +79,30 @@ Status clear(OperationContext* opCtx, Status result = planCache->remove(*cq); if (!result.isOK()) { invariant(result.code() == ErrorCodes::NoSuchKey); - LOG(1) << ns << ": query shape doesn't exist in PlanCache - " - << redact(cq->getQueryObj()) << "(sort: " << cq->getQueryRequest().getSort() - << "; projection: " << cq->getQueryRequest().getProj() - << "; collation: " << cq->getQueryRequest().getCollation() << ")"; + LOGV2_DEBUG(23906, + 1, + "{ns}: query shape doesn't exist in PlanCache - {cq_getQueryObj}(sort: " + "{cq_getQueryRequest_getSort}; projection: {cq_getQueryRequest_getProj}; " + "collation: {cq_getQueryRequest_getCollation})", + "ns"_attr = ns, + "cq_getQueryObj"_attr = redact(cq->getQueryObj()), + "cq_getQueryRequest_getSort"_attr = cq->getQueryRequest().getSort(), + "cq_getQueryRequest_getProj"_attr = cq->getQueryRequest().getProj(), + "cq_getQueryRequest_getCollation"_attr = + cq->getQueryRequest().getCollation()); return Status::OK(); } - LOG(1) << ns << ": removed plan cache entry - " << redact(cq->getQueryObj()) - << "(sort: " << cq->getQueryRequest().getSort() - << "; projection: " << cq->getQueryRequest().getProj() - << "; collation: " << cq->getQueryRequest().getCollation() << ")"; + LOGV2_DEBUG(23907, + 1, + "{ns}: removed plan cache entry - {cq_getQueryObj}(sort: " + "{cq_getQueryRequest_getSort}; projection: {cq_getQueryRequest_getProj}; " + "collation: {cq_getQueryRequest_getCollation})", + "ns"_attr = ns, + "cq_getQueryObj"_attr = redact(cq->getQueryObj()), + "cq_getQueryRequest_getSort"_attr = cq->getQueryRequest().getSort(), + "cq_getQueryRequest_getProj"_attr = cq->getQueryRequest().getProj(), + "cq_getQueryRequest_getCollation"_attr = cq->getQueryRequest().getCollation()); return Status::OK(); } @@ -104,7 +117,7 @@ Status clear(OperationContext* opCtx, planCache->clear(); - LOG(1) << ns << ": cleared plan cache"; + LOGV2_DEBUG(23908, 1, "{ns}: cleared plan cache", "ns"_attr = ns); return Status::OK(); } |