feat:日志打印优化
This commit is contained in:
@@ -73,7 +73,7 @@ public class HttpService {
|
|||||||
CloseableHttpResponse response = null;
|
CloseableHttpResponse response = null;
|
||||||
String result = "";
|
String result = "";
|
||||||
try {
|
try {
|
||||||
log.info("HTTP请求,请求地址===>{}, 请求头===>{}, 请求参数===>{}", url, JSON.toJSONString(header), jsonParams);
|
log.debug("HTTP请求,请求地址===>{}, 请求头===>{}, 请求参数===>{}", url, JSON.toJSONString(header), jsonParams);
|
||||||
HttpPost httpPost = new HttpPost(url);
|
HttpPost httpPost = new HttpPost(url);
|
||||||
httpPost.addHeader("Content-Type", "application/json");
|
httpPost.addHeader("Content-Type", "application/json");
|
||||||
// 创建请求内容
|
// 创建请求内容
|
||||||
@@ -88,7 +88,7 @@ public class HttpService {
|
|||||||
}
|
}
|
||||||
response = httpClient.execute(httpPost);
|
response = httpClient.execute(httpPost);
|
||||||
result = EntityUtils.toString(response.getEntity(), "utf-8");
|
result = EntityUtils.toString(response.getEntity(), "utf-8");
|
||||||
log.info("【POST请求】 请求地址===>{}, 响应结果==={}", url, result);
|
log.debug("【POST请求】 请求地址===>{}, 响应结果==={}", url, result);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("doPost异常", e);
|
log.error("doPost异常", e);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<configuration scan="true">
|
<configuration scan="true">
|
||||||
|
|
||||||
<!-- 应用名称:和统一配置中的项目代码保持一致(小写) -->
|
<!-- 应用名称:和统一配置中的项目代码保持一致(小写) -->
|
||||||
<springProperty scope="context" name="APP_NAME" source="spring.application.name" defaultValue="X_APP" />
|
<springProperty scope="context" name="APP_NAME" source="spring.application.name" defaultValue="APP" />
|
||||||
<contextName>${APP_NAME}</contextName>
|
<contextName>${APP_NAME}</contextName>
|
||||||
|
|
||||||
<!--日志文件保留天数 -->
|
<!--日志文件保留天数 -->
|
||||||
|
|||||||
Reference in New Issue
Block a user