summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops
diff options
context:
space:
mode:
authorThomas Schubert <thomas.schubert@mongodb.com>2016-08-30 01:52:29 -0400
committerThomas Schubert <thomas.schubert@mongodb.com>2016-09-02 15:17:08 -0400
commitfba18b66c7140178fd5b4efdd42d51fb9e0fc0ae (patch)
tree9bf43b5ad510db17b9536c25a29695a8ec3b2405 /src/mongo/db/ops
parentf288ea86db58c6aefe4807ed7ac1815577da2752 (diff)
downloadmongo-fba18b66c7140178fd5b4efdd42d51fb9e0fc0ae.tar.gz
SERVER-24991 log redaction for matcher, ops, pipeline, query
Diffstat (limited to 'src/mongo/db/ops')
-rw-r--r--src/mongo/db/ops/update_result.cpp2
-rw-r--r--src/mongo/db/ops/write_ops_exec.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/ops/update_result.cpp b/src/mongo/db/ops/update_result.cpp
index a293ac98ba2..97a5a5332df 100644
--- a/src/mongo/db/ops/update_result.cpp
+++ b/src/mongo/db/ops/update_result.cpp
@@ -52,7 +52,7 @@ UpdateResult::UpdateResult(bool existing_,
if (!existing && numMatched == 0 && !id.eoo()) {
upserted = id.wrap(kUpsertedFieldName);
}
- LOG(4) << "UpdateResult -- " << toString();
+ LOG(4) << "UpdateResult -- " << redact(toString());
}
} // namespace mongo
diff --git a/src/mongo/db/ops/write_ops_exec.cpp b/src/mongo/db/ops/write_ops_exec.cpp
index 52db4a5674a..1dc30e1aae4 100644
--- a/src/mongo/db/ops/write_ops_exec.cpp
+++ b/src/mongo/db/ops/write_ops_exec.cpp
@@ -100,8 +100,8 @@ void finishCurOp(OperationContext* txn, CurOp* curOp) {
curOp->getReadWriteType());
if (!curOp->debug().exceptionInfo.empty()) {
- LOG(3) << "Caught Assertion in " << logicalOpToString(curOp->getLogicalOp()) << ": "
- << curOp->debug().exceptionInfo.toString();
+ LOG(3) << "Caught Assertion in " << redact(logicalOpToString(curOp->getLogicalOp()))
+ << ": " << curOp->debug().exceptionInfo.toString();
}
const bool logAll = logger::globalLogDomain()->shouldLog(logger::LogComponent::kCommand,
@@ -112,7 +112,7 @@ void finishCurOp(OperationContext* txn, CurOp* curOp) {
if (logAll || logSlow) {
Locker::LockerInfo lockerInfo;
txn->lockState()->getLockerInfo(&lockerInfo);
- log() << curOp->debug().report(txn->getClient(), *curOp, lockerInfo.stats);
+ log() << redact(curOp->debug().report(txn->getClient(), *curOp, lockerInfo.stats));
}
if (curOp->shouldDBProfile(executionTimeMs)) {
@@ -122,7 +122,7 @@ void finishCurOp(OperationContext* txn, CurOp* curOp) {
// We need to ignore all errors here. We don't want a successful op to fail because of a
// failure to record stats. We also don't want to replace the error reported for an op that
// is failing.
- log() << "Ignoring error from finishCurOp: " << ex.toString();
+ log() << "Ignoring error from finishCurOp: " << redact(ex);
}
}