diff options
author | Jason Rassi <rassi@10gen.com> | 2016-01-20 16:22:58 -0500 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2016-01-20 16:25:34 -0500 |
commit | f0df9f46e6979af1bd922c8ee36c2c35f722b400 (patch) | |
tree | 31773bda079b0d3e2f3e349a28c5b664db945a5f | |
parent | ee444290d19918b26df3b3bf40201a0dc1ecdaad (diff) | |
download | mongo-f0df9f46e6979af1bd922c8ee36c2c35f722b400.tar.gz |
SERVER-21776 Diagnostic logic for reads/writes should use correct log component
(cherry picked from commit f210ee304a3b6eeb85a67305e6a97a32e1df3c81)
-rw-r--r-- | src/mongo/db/commands/write_commands/batch_executor.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/query/find.cpp | 4 |
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 53d6fa06500..74717698950 100644 --- a/src/mongo/db/commands/write_commands/batch_executor.cpp +++ b/src/mongo/db/commands/write_commands/batch_executor.cpp @@ -560,7 +560,7 @@ static void finishCurrentOp(OperationContext* txn, WriteErrorDetail* opError) { if (opError) logCurOpError(currentOp, opError); - 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 5fa977392fe..89c356a3fe8 100644 --- a/src/mongo/db/query/find.cpp +++ b/src/mongo/db/query/find.cpp @@ -162,12 +162,12 @@ void endQueryOp(OperationContext* txn, collection->infoCache()->notifyOfQuery(txn, summaryStats.indexesUsed); } - const logger::LogComponent queryLogComponent = logger::LogComponent::kQuery; + const logger::LogComponent commandLogComponent = logger::LogComponent::kCommand; const logger::LogSeverity logLevelOne = logger::LogSeverity::Debug(1); // Set debug information for consumption by the profiler and slow query log. if (dbProfilingLevel > 0 || curop->elapsedMillis() > serverGlobalParams.slowMS || - logger::globalLogDomain()->shouldLog(queryLogComponent, logLevelOne)) { + logger::globalLogDomain()->shouldLog(commandLogComponent, logLevelOne)) { // Generate plan summary string. stdx::lock_guard<Client>(*txn->getClient()); curop->setPlanSummary_inlock(Explain::getPlanSummary(&exec)); |