add close socket connection error log

pull/552/head
lepdou 3 years ago
parent 5647899be6
commit 7a68404b2d

@ -27,6 +27,9 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
/** /**
@ -36,6 +39,8 @@ import org.springframework.util.StringUtils;
*/ */
public final class AddressUtils { public final class AddressUtils {
private static final Logger LOGGER = LoggerFactory.getLogger(AddressUtils.class);
private static final String ADDRESS_SEPARATOR = ","; private static final String ADDRESS_SEPARATOR = ",";
private AddressUtils() { private AddressUtils() {
@ -67,7 +72,7 @@ public final class AddressUtils {
socket.close(); socket.close();
} }
catch (IOException e) { catch (IOException e) {
e.printStackTrace(); LOGGER.error("Close socket connection failed.", e);
} }
} }
return true; return true;

@ -13,9 +13,20 @@
<artifactId>spring-cloud-tencent-pushgateway-plugin</artifactId> <artifactId>spring-cloud-tencent-pushgateway-plugin</artifactId>
<dependencies> <dependencies>
<dependency>
<groupId>io.prometheus</groupId>
<artifactId>simpleclient_pushgateway</artifactId>
<version>0.11.0</version>
</dependency>
<dependency> <dependency>
<groupId>com.tencent.polaris</groupId> <groupId>com.tencent.polaris</groupId>
<artifactId>stat-pushgateway</artifactId> <artifactId>stat-pushgateway</artifactId>
<exclusions>
<exclusion>
<artifactId>simpleclient_pushgateway</artifactId>
<groupId>io.prometheus</groupId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.tencent.cloud</groupId> <groupId>com.tencent.cloud</groupId>

Loading…
Cancel
Save