From a84c09a19720b73cedb2e8ef7c5cfeedfa1c9761 Mon Sep 17 00:00:00 2001 From: Gabriel Russell Date: Thu, 13 Feb 2020 11:49:46 -0500 Subject: SERVER-45869 automatically converted structured logging --- src/mongo/client/sasl_client_authenticate_impl.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/mongo/client/sasl_client_authenticate_impl.cpp') diff --git a/src/mongo/client/sasl_client_authenticate_impl.cpp b/src/mongo/client/sasl_client_authenticate_impl.cpp index 860f913971b..f95ed39811d 100644 --- a/src/mongo/client/sasl_client_authenticate_impl.cpp +++ b/src/mongo/client/sasl_client_authenticate_impl.cpp @@ -48,6 +48,7 @@ #include "mongo/client/sasl_client_authenticate.h" #include "mongo/client/sasl_client_session.h" #include "mongo/db/auth/sasl_command_constants.h" +#include "mongo/logv2/log.h" #include "mongo/rpc/get_status_from_command_result.h" #include "mongo/util/base64.h" #include "mongo/util/log.h" @@ -181,7 +182,10 @@ Future asyncSaslConversation(auth::RunCommandHook runCommand, if (!status.isOK()) return status; - LOG(saslLogLevel) << "sasl client input: " << base64::encode(payload) << endl; + LOGV2_DEBUG(20197, + logSeverityV1toV2(saslLogLevel).toInt(), + "sasl client input: {base64_encode_payload}", + "base64_encode_payload"_attr = base64::encode(payload)); // Create new payload for our response std::string responsePayload; @@ -189,7 +193,10 @@ Future asyncSaslConversation(auth::RunCommandHook runCommand, if (!status.isOK()) return status; - LOG(saslLogLevel) << "sasl client output: " << base64::encode(responsePayload) << endl; + LOGV2_DEBUG(20198, + logSeverityV1toV2(saslLogLevel).toInt(), + "sasl client output: {base64_encode_responsePayload}", + "base64_encode_responsePayload"_attr = base64::encode(responsePayload)); // Handle a done from the server which comes before the client is complete. const bool serverDone = inputObj[saslCommandDoneFieldName].trueValue(); -- cgit v1.2.1