summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReo Kimura <reo.kimura@mongodb.com>2020-06-26 17:33:45 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-07-09 17:14:19 +0000
commitc3998c148074d9b31bf2d6e4ad3910756b394e9f (patch)
treef285b9ace47ba297b52ee73583416a1b1e3a4617
parent1b0445dc3ea2a3d15ae477238f68b0a4438a7212 (diff)
downloadmongo-c3998c148074d9b31bf2d6e4ad3910756b394e9f.tar.gz
SERVER-48205 Descriptive details added to toString() functions
-rw-r--r--src/mongo/executor/remote_command_response.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mongo/executor/remote_command_response.cpp b/src/mongo/executor/remote_command_response.cpp
index 0b88b3d340d..146a3abc70d 100644
--- a/src/mongo/executor/remote_command_response.cpp
+++ b/src/mongo/executor/remote_command_response.cpp
@@ -77,7 +77,10 @@ bool RemoteCommandResponseBase::isOK() const {
std::string RemoteCommandResponse::toString() const {
return str::stream() << "RemoteResponse -- "
- << " cmd:" << data.toString();
+ << " cmd:" << data.toString() << " status: " << status.toString()
+ << " elapsedMillis: "
+ << (elapsedMillis != boost::none ? elapsedMillis.get().toString() : "n/a")
+ << " moreToCome: " << moreToCome;
}
bool RemoteCommandResponse::operator==(const RemoteCommandResponse& rhs) const {
@@ -148,7 +151,10 @@ bool RemoteCommandOnAnyResponse::operator!=(const RemoteCommandOnAnyResponse& rh
std::string RemoteCommandOnAnyResponse::toString() const {
return str::stream() << "RemoteOnAnyResponse -- "
<< " cmd:" << data.toString() << " target: "
- << (!target ? StringData("[none]") : StringData(target->toString()));
+ << (!target ? StringData("[none]") : StringData(target->toString()))
+ << " status: " << status.toString() << " elapsedMillis: "
+ << (elapsedMillis != boost::none ? elapsedMillis.get().toString() : "n/a")
+ << " moreToCome: " << moreToCome;
}
std::ostream& operator<<(std::ostream& os, const RemoteCommandOnAnyResponse& response) {