diff options
author | Gabriel Russell <gabriel.russell@mongodb.com> | 2020-02-13 11:49:46 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-13 18:16:35 +0000 |
commit | a84c09a19720b73cedb2e8ef7c5cfeedfa1c9761 (patch) | |
tree | 85ac46cd5f4ea6d5134560bf764fb9e6cf11fe4e /src/mongo/client/dbclient_cursor.cpp | |
parent | 6df40e01f7b6899affc4536e7e73a35802cabf98 (diff) | |
download | mongo-a84c09a19720b73cedb2e8ef7c5cfeedfa1c9761.tar.gz |
SERVER-45869 automatically converted structured logging
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); |