修改流量统计日志级别为debug,新增更新协议类型码表sql,流量统计超时时间设置为1分钟
This commit is contained in:
@@ -69,21 +69,20 @@ public class HttpClientUtil {
|
||||
URIBuilder uriBuilder = new URIBuilder(destUrl);
|
||||
System.err.println(uriBuilder);
|
||||
url=uriBuilder.toString();
|
||||
logger.info("流量统计数据请求路径:"+url);
|
||||
logger.debug("流量统计数据请求路径:"+url);
|
||||
//创建连接
|
||||
WebTarget wt = ClientUtil.getWebTarger(url);
|
||||
logger.info("getMsg url:"+url);
|
||||
//获取响应结果
|
||||
Builder header = wt.request(MediaType.APPLICATION_JSON).header("Content-Type", MediaType.APPLICATION_JSON);
|
||||
response= header.get();
|
||||
int status = response.getStatus();
|
||||
if (status == HttpStatus.SC_OK) {
|
||||
if (status != HttpStatus.SC_OK) {
|
||||
result= response.readEntity(String.class);
|
||||
//调用处理数据方法
|
||||
logger.info("获取消息成功,相应内容如下: " + result);
|
||||
logger.debug("获取消息成功,相应内容如下: " + result);
|
||||
} else {
|
||||
logger.error("获取消息失败,相应内容如下: " + result);
|
||||
throw new ConnectException("流量统计服务接口连接错误"+result);
|
||||
logger.error("获取消息失败,相应内容如下: " + response);
|
||||
throw new ConnectException("流量统计服务接口连接错误"+response);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw e;
|
||||
@@ -276,9 +275,9 @@ public class HttpClientUtil {
|
||||
//调用处理数据方法
|
||||
result = galaxyMessageFormat(result);
|
||||
if(!StringUtil.isEmpty(result) && result.length() > 501) {
|
||||
logger.info("获取消息成功,相应内容如下: " + result.substring(0, 500));
|
||||
logger.debug("获取消息成功,相应内容如下: " + result.substring(0, 500));
|
||||
}else {
|
||||
logger.info("获取消息成功,相应内容如下: " + result);
|
||||
logger.debug("获取消息成功,相应内容如下: " + result);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user