diff options
Diffstat (limited to 'src/mongo/client/dbclient_cursor.cpp')
-rw-r--r-- | src/mongo/client/dbclient_cursor.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mongo/client/dbclient_cursor.cpp b/src/mongo/client/dbclient_cursor.cpp index 7639abe1ec6..4fa665c5e14 100644 --- a/src/mongo/client/dbclient_cursor.cpp +++ b/src/mongo/client/dbclient_cursor.cpp @@ -46,6 +46,7 @@ #include "mongo/db/query/cursor_response.h" #include "mongo/db/query/getmore_request.h" #include "mongo/db/query/query_request.h" +#include "mongo/logv2/log.h" #include "mongo/rpc/factory.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/rpc/metadata.h" @@ -203,13 +204,13 @@ bool DBClientCursor::init() { _client->call(toSend, reply, true, &_originalHost); } catch (const DBException&) { // log msg temp? - log() << "DBClientCursor::init call() failed" << endl; + LOGV2(20127, "DBClientCursor::init call() failed"); // We always want to throw on network exceptions. throw; } if (reply.empty()) { // log msg temp? - log() << "DBClientCursor::init message from call() was empty" << endl; + LOGV2(20128, "DBClientCursor::init message from call() was empty"); return false; } dataReceived(reply); @@ -235,9 +236,11 @@ bool DBClientCursor::initLazyFinish(bool& retry) { // If we get a bad response, return false if (!recvStatus.isOK() || reply.empty()) { if (!recvStatus.isOK()) - log() << "DBClientCursor::init lazy say() failed: " << redact(recvStatus) << endl; + LOGV2(20129, + "DBClientCursor::init lazy say() failed: {recvStatus}", + "recvStatus"_attr = redact(recvStatus)); if (reply.empty()) - log() << "DBClientCursor::init message from say() was empty" << endl; + LOGV2(20130, "DBClientCursor::init message from say() was empty"); _client->checkResponse({}, true, &retry, &_lazyHost); |