diff options
author | Thomas Schubert <thomas.schubert@mongodb.com> | 2016-08-24 16:01:07 -0400 |
---|---|---|
committer | Thomas Schubert <thomas.schubert@mongodb.com> | 2016-09-02 16:38:54 -0400 |
commit | 81bc570b41f59f8a7101df13892272bae6da9857 (patch) | |
tree | c3bf61103fbf399ca1f165afd94296da8132d31b /src/mongo/db/cloner.cpp | |
parent | fba18b66c7140178fd5b4efdd42d51fb9e0fc0ae (diff) | |
download | mongo-81bc570b41f59f8a7101df13892272bae6da9857.tar.gz |
SERVER-24991 log redaction for bson, client, auth, catalog
Diffstat (limited to 'src/mongo/db/cloner.cpp')
-rw-r--r-- | src/mongo/db/cloner.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/db/cloner.cpp b/src/mongo/db/cloner.cpp index ec78619b22e..249b807ab53 100644 --- a/src/mongo/db/cloner.cpp +++ b/src/mongo/db/cloner.cpp @@ -163,7 +163,7 @@ struct Cloner::Fun { if (now - lastLog >= 60) { // report progress if (lastLog) - log() << "clone " << to_collection << ' ' << numSeen << endl; + log() << "clone " << to_collection << ' ' << numSeen; lastLog = now; } txn->checkForInterrupt(); @@ -224,7 +224,7 @@ struct Cloner::Fun { if (!status.isOK()) { str::stream ss; ss << "Cloner: found corrupt document in " << from_collection.toString() << ": " - << status.reason(); + << redact(status); if (skipCorruptDocumentsWhenCloning) { warning() << ss.ss.str() << "; skipping"; continue; @@ -244,7 +244,7 @@ struct Cloner::Fun { Status status = collection->insertDocument(txn, doc, nullOpDebug, true); if (!status.isOK()) { error() << "error: exception cloning object in " << from_collection << ' ' - << status << " obj:" << doc; + << redact(status) << " obj:" << redact(doc); } uassertStatusOK(status); wunit.commit(); @@ -280,7 +280,7 @@ void Cloner::copy(OperationContext* txn, const CloneOptions& opts, Query query) { LOG(2) << "\t\tcloning collection " << from_collection << " to " << to_collection << " on " - << _conn->getServerAddress() << " with filter " << query.toString() << endl; + << _conn->getServerAddress() << " with filter " << redact(query.toString()); Fun f(txn, toDBName); f.numSeen = 0; @@ -461,7 +461,7 @@ bool Cloner::copyCollection(OperationContext* txn, /* TODO : copyIndexes bool does not seem to be implemented! */ if (!shouldCopyIndexes) { - log() << "ERROR copy collection shouldCopyIndexes not implemented? " << ns << endl; + log() << "ERROR copy collection shouldCopyIndexes not implemented? " << ns; } // indexes @@ -494,7 +494,7 @@ StatusWith<std::vector<BSONObj>> Cloner::filterCollectionsForClone( if (ns.isSystem()) { if (legalClientSystemNS(ns.ns()) == 0) { - LOG(2) << "\t\t not cloning because system collection" << endl; + LOG(2) << "\t\t not cloning because system collection"; continue; } } @@ -631,7 +631,7 @@ Status Cloner::copyDb(OperationContext* txn, } } for (auto&& collection : toClone) { - LOG(2) << " really will clone: " << collection << endl; + LOG(2) << " really will clone: " << collection; const char* collectionName = collection["name"].valuestr(); BSONObj options = collection.getObjectField("options"); @@ -643,7 +643,7 @@ Status Cloner::copyDb(OperationContext* txn, clonedColls->insert(from_name.ns()); } - LOG(1) << "\t\t cloning " << from_name << " -> " << to_name << endl; + LOG(1) << "\t\t cloning " << from_name << " -> " << to_name; Query q; if (opts.snapshot) q.snapshot(); |