diff --git a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientChannelManager.java b/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientChannelManager.java index dc3c4a15b3d..3f91e31f37d 100644 --- a/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientChannelManager.java +++ b/core/src/main/java/org/apache/seata/core/rpc/netty/NettyClientChannelManager.java @@ -251,17 +251,21 @@ void doReconnect(List availList, String transactionServiceGroup) { } } if (failedMap.size() > 0) { + // Merge all failed addresses into a single log entry to avoid flooding logs. + // info level: output summary without stack traces if (LOGGER.isInfoEnabled()) { - LOGGER.error( + LOGGER.info( "{} can not connect to {} cause:{}", FrameworkErrorCode.NetConnect.getErrCode(), failedMap.keySet(), failedMap.values().stream() .map(Throwable::getMessage) .collect(Collectors.toSet())); - } else if (LOGGER.isDebugEnabled()) { + } + // debug level: output detailed stack traces for each failed address + if (LOGGER.isDebugEnabled()) { failedMap.forEach((key, value) -> { - LOGGER.error( + LOGGER.debug( "{} can not connect to {} cause:{} trace information:", FrameworkErrorCode.NetConnect.getErrCode(), key,