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/db/service_entry_point_mongod.cpp | |
parent | 6df40e01f7b6899affc4536e7e73a35802cabf98 (diff) | |
download | mongo-a84c09a19720b73cedb2e8ef7c5cfeedfa1c9761.tar.gz |
SERVER-45869 automatically converted structured logging
Diffstat (limited to 'src/mongo/db/service_entry_point_mongod.cpp')
-rw-r--r-- | src/mongo/db/service_entry_point_mongod.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/mongo/db/service_entry_point_mongod.cpp b/src/mongo/db/service_entry_point_mongod.cpp index f365c4d4987..f2ad493211e 100644 --- a/src/mongo/db/service_entry_point_mongod.cpp +++ b/src/mongo/db/service_entry_point_mongod.cpp @@ -47,6 +47,7 @@ #include "mongo/db/s/sharding_state.h" #include "mongo/db/service_entry_point_common.h" #include "mongo/logger/redaction.h" +#include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/rpc/metadata/config_server_metadata.h" #include "mongo/rpc/metadata/sharding_metadata.h" @@ -84,11 +85,18 @@ public: if (ErrorCodes::isExceededTimeLimitError(rcStatus.code())) { const int debugLevel = serverGlobalParams.clusterRole == ClusterRole::ConfigServer ? 0 : 2; - LOG(debugLevel) << "Command on database " << request.getDatabase() - << " timed out waiting for read concern to be satisfied. Command: " - << redact(ServiceEntryPointCommon::getRedactedCopyForLogging( - invocation->definition(), request.body)) - << ". Info: " << redact(rcStatus); + LOGV2_DEBUG( + 21975, + logSeverityV1toV2(debugLevel).toInt(), + "Command on database {request_getDatabase} timed out waiting for read concern " + "to be satisfied. Command: " + "{ServiceEntryPointCommon_getRedactedCopyForLogging_invocation_definition_" + "request_body}. Info: {rcStatus}", + "request_getDatabase"_attr = request.getDatabase(), + "ServiceEntryPointCommon_getRedactedCopyForLogging_invocation_definition_request_body"_attr = + redact(ServiceEntryPointCommon::getRedactedCopyForLogging( + invocation->definition(), request.body)), + "rcStatus"_attr = redact(rcStatus)); } uassertStatusOK(rcStatus); |