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

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

Loading…
Cancel
Save