From 20d60d3491908f1ae252fe452300de3978a040c7 Mon Sep 17 00:00:00 2001 From: Jason Rassi Date: Wed, 20 Jan 2016 16:22:58 -0500 Subject: SERVER-21776 Diagnostic logic for reads/writes should use correct log component (cherry picked from commit f210ee304a3b6eeb85a67305e6a97a32e1df3c81) --- src/mongo/db/commands/write_commands/batch_executor.cpp | 2 +- src/mongo/db/query/find.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mongo/db/commands/write_commands/batch_executor.cpp b/src/mongo/db/commands/write_commands/batch_executor.cpp index a76d9bd425c..eb51509eba8 100644 --- a/src/mongo/db/commands/write_commands/batch_executor.cpp +++ b/src/mongo/db/commands/write_commands/batch_executor.cpp @@ -626,7 +626,7 @@ static void finishCurrentOp(OperationContext* txn, CurOp* currentOp, WriteErrorD << causedBy(opError->getErrMessage()) << endl; } - bool logAll = logger::globalLogDomain()->shouldLog(logger::LogComponent::kWrite, + bool logAll = logger::globalLogDomain()->shouldLog(logger::LogComponent::kCommand, logger::LogSeverity::Debug(1)); bool logSlow = executionTime > (serverGlobalParams.slowMS + currentOp->getExpectedLatencyMs()); diff --git a/src/mongo/db/query/find.cpp b/src/mongo/db/query/find.cpp index a35f69bf1f7..08cecc32813 100644 --- a/src/mongo/db/query/find.cpp +++ b/src/mongo/db/query/find.cpp @@ -801,7 +801,7 @@ std::string runQuery(OperationContext* txn, shardingState.getVersion(nss.ns())); } - const logger::LogComponent queryLogComponent = logger::LogComponent::kQuery; + const logger::LogComponent commandLogComponent = logger::LogComponent::kCommand; const logger::LogSeverity logLevelOne = logger::LogSeverity::Debug(1); PlanSummaryStats summaryStats; @@ -816,7 +816,7 @@ std::string runQuery(OperationContext* txn, // Set debug information for consumption by the profiler. if (dbProfilingLevel > 0 || curop.elapsedMillis() > serverGlobalParams.slowMS || - logger::globalLogDomain()->shouldLog(queryLogComponent, logLevelOne)) { + logger::globalLogDomain()->shouldLog(commandLogComponent, logLevelOne)) { // Get BSON stats. scoped_ptr execStats(exec->getStats()); BSONObjBuilder statsBob; -- cgit v1.2.1