summaryrefslogtreecommitdiff
path: root/src/mongo/s/async_requests_sender.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/async_requests_sender.cpp')
-rw-r--r--src/mongo/s/async_requests_sender.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mongo/s/async_requests_sender.cpp b/src/mongo/s/async_requests_sender.cpp
index 133f9333183..de8004ad182 100644
--- a/src/mongo/s/async_requests_sender.cpp
+++ b/src/mongo/s/async_requests_sender.cpp
@@ -27,7 +27,7 @@
* it in the license file.
*/
-#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kQuery
+#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery
#include "mongo/platform/basic.h"
@@ -38,6 +38,7 @@
#include "mongo/client/remote_command_targeter.h"
#include "mongo/executor/remote_command_request.h"
+#include "mongo/logv2/log.h"
#include "mongo/rpc/get_status_from_command_result.h"
#include "mongo/s/client/shard_registry.h"
#include "mongo/s/grid.h"
@@ -45,7 +46,6 @@
#include "mongo/transport/baton.h"
#include "mongo/transport/transport_layer.h"
#include "mongo/util/assert_util.h"
-#include "mongo/util/log.h"
#include "mongo/util/scopeguard.h"
using namespace fmt::literals;
@@ -247,13 +247,13 @@ auto AsyncRequestsSender::RemoteData::handleResponse(RemoteCommandOnAnyCallbackA
if (!_ars->_stopRetrying && shard->isRetriableError(status.code(), _ars->_retryPolicy) &&
_retryCount < kMaxNumFailedHostRetryAttempts) {
- LOG(1) << "Command to remote " << _shardId
- << (failedTargets.empty()
- ? " "
- : (failedTargets.size() > 1 ? " for hosts " : " at host "))
- << "{}"_format(fmt::join(failedTargets, ", "))
- << "failed with retriable error and will be retried "
- << causedBy(redact(status));
+ LOGV2_DEBUG(4615637,
+ 1,
+ "Command to remote {shardId} for hosts {hosts} failed with retriable error "
+ "and will be retried. Caused by {causedBy}",
+ "shardId"_attr = _shardId,
+ "hosts"_attr = failedTargets,
+ "causedBy"_attr = redact(status));
++_retryCount;
_shardHostAndPort.reset();