summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Rassi <rassi@10gen.com>2016-01-20 16:22:58 -0500
committerJason Rassi <rassi@10gen.com>2016-01-20 16:37:29 -0500
commit20d60d3491908f1ae252fe452300de3978a040c7 (patch)
tree0f8f186d66d84bb6ba51d40254f80a01bec44b60
parentc44a3ecdffd5c98fdd2daa6e46f52c50ff594576 (diff)
downloadmongo-20d60d3491908f1ae252fe452300de3978a040c7.tar.gz
SERVER-21776 Diagnostic logic for reads/writes should use correct log componentr3.0.9
(cherry picked from commit f210ee304a3b6eeb85a67305e6a97a32e1df3c81)
-rw-r--r--src/mongo/db/commands/write_commands/batch_executor.cpp2
-rw-r--r--src/mongo/db/query/find.cpp4
2 files changed, 3 insertions, 3 deletions
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<PlanStageStats> execStats(exec->getStats());
BSONObjBuilder statsBob;