summaryrefslogtreecommitdiff
path: root/src/mongo/rpc/metadata/client_metadata.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/rpc/metadata/client_metadata.cpp')
-rw-r--r--src/mongo/rpc/metadata/client_metadata.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mongo/rpc/metadata/client_metadata.cpp b/src/mongo/rpc/metadata/client_metadata.cpp
index 9b51a4bc750..455df2abee1 100644
--- a/src/mongo/rpc/metadata/client_metadata.cpp
+++ b/src/mongo/rpc/metadata/client_metadata.cpp
@@ -41,6 +41,7 @@
#include "mongo/bson/bsonobj.h"
#include "mongo/bson/bsonobjbuilder.h"
#include "mongo/db/operation_context.h"
+#include "mongo/logv2/log.h"
#include "mongo/s/is_mongos.h"
#include "mongo/util/log.h"
#include "mongo/util/processinfo.h"
@@ -435,8 +436,12 @@ const BSONObj& ClientMetadata::getDocument() const {
void ClientMetadata::logClientMetadata(Client* client) const {
invariant(!getDocument().isEmpty());
- log() << "received client metadata from " << client->getRemote().toString() << " "
- << client->desc() << ": " << getDocument();
+ LOGV2(51800,
+ "received client metadata from {remote} {client}: {doc}",
+ "client metadata",
+ "remote"_attr = client->getRemote(),
+ "client"_attr = client->desc(),
+ "doc"_attr = getDocument());
}
StringData ClientMetadata::fieldName() {