diff options
Diffstat (limited to 'src/mongo/db/commands.cpp')
| -rw-r--r-- | src/mongo/db/commands.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/commands.cpp b/src/mongo/db/commands.cpp index 42bad714800..8f9baa02321 100644 --- a/src/mongo/db/commands.cpp +++ b/src/mongo/db/commands.cpp @@ -325,9 +325,9 @@ void Command::generateErrorResponse(OperationContext* txn, const BSONObj& metadata) { LOG(1) << "assertion while executing command '" << request.getCommandName() << "' " << "on database '" << request.getDatabase() << "' " - << "with arguments '" << command->getRedactedCopyForLogging(request.getCommandArgs()) - << "' " - << "and metadata '" << request.getMetadata() << "': " << exception.toString(); + << "with arguments '" + << redact(command->getRedactedCopyForLogging(request.getCommandArgs())) << "' " + << "and metadata '" << request.getMetadata() << "': " << redact(exception.toString()); _generateErrorResponse(txn, replyBuilder, exception, metadata); } @@ -337,7 +337,7 @@ void Command::generateErrorResponse(OperationContext* txn, const DBException& exception, const rpc::RequestInterface& request) { LOG(1) << "assertion while executing command '" << request.getCommandName() << "' " - << "on database '" << request.getDatabase() << "': " << exception.toString(); + << "on database '" << request.getDatabase() << "': " << redact(exception.toString()); _generateErrorResponse(txn, replyBuilder, exception, rpc::makeEmptyMetadata()); } @@ -345,7 +345,7 @@ void Command::generateErrorResponse(OperationContext* txn, void Command::generateErrorResponse(OperationContext* txn, rpc::ReplyBuilderInterface* replyBuilder, const DBException& exception) { - LOG(1) << "assertion while executing command: " << exception.toString(); + LOG(1) << "assertion while executing command: " << redact(exception.toString()); _generateErrorResponse(txn, replyBuilder, exception, rpc::makeEmptyMetadata()); } |
