From a159af592e8fde42d0ec2a9ced20af2ebef5117d Mon Sep 17 00:00:00 2001 From: xin gu <418294249@qq.com> Date: Thu, 1 Sep 2022 20:33:15 +0800 Subject: [PATCH] Update BroadcastClusterInvoker.java (#10527) faq-BroadcastClusterInvoker --- .../rpc/cluster/support/BroadcastClusterInvoker.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/BroadcastClusterInvoker.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/BroadcastClusterInvoker.java index 2367476030..f44035a6a4 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/BroadcastClusterInvoker.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/BroadcastClusterInvoker.java @@ -17,7 +17,7 @@ package org.apache.dubbo.rpc.cluster.support; import org.apache.dubbo.common.URL; -import org.apache.dubbo.common.logger.Logger; +import org.apache.dubbo.common.logger.ErrorTypeAwareLogger; import org.apache.dubbo.common.logger.LoggerFactory; import org.apache.dubbo.rpc.Invocation; import org.apache.dubbo.rpc.Invoker; @@ -37,7 +37,7 @@ import static org.apache.dubbo.rpc.Constants.ASYNC_KEY; */ public class BroadcastClusterInvoker extends AbstractClusterInvoker { - private static final Logger logger = LoggerFactory.getLogger(BroadcastClusterInvoker.class); + private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(BroadcastClusterInvoker.class); private static final String BROADCAST_FAIL_PERCENT_KEY = "broadcast.fail.percent"; private static final int MAX_BROADCAST_FAIL_PERCENT = 100; private static final int MIN_BROADCAST_FAIL_PERCENT = 0; @@ -76,7 +76,7 @@ public class BroadcastClusterInvoker extends AbstractClusterInvoker { Throwable resultException = result.getException(); if (null != resultException) { exception = getRpcException(result.getException()); - logger.warn(exception.getMessage(), exception); + logger.warn("2-8","provider return error response","",exception.getMessage(),exception); failIndex++; if (failIndex == failThresholdIndex) { break; @@ -85,7 +85,7 @@ public class BroadcastClusterInvoker extends AbstractClusterInvoker { } } catch (Throwable e) { exception = getRpcException(e); - logger.warn(exception.getMessage(), exception); + logger.warn("2-8","provider return error response","",exception.getMessage(),exception); failIndex++; if (failIndex == failThresholdIndex) { break;