feat:日志打印优化
This commit is contained in:
@@ -73,7 +73,7 @@ public class HttpService {
|
||||
CloseableHttpResponse response = null;
|
||||
String result = "";
|
||||
try {
|
||||
log.info("HTTP请求,请求地址===>{}, 请求头===>{}, 请求参数===>{}", url, JSON.toJSONString(header), jsonParams);
|
||||
log.debug("HTTP请求,请求地址===>{}, 请求头===>{}, 请求参数===>{}", url, JSON.toJSONString(header), jsonParams);
|
||||
HttpPost httpPost = new HttpPost(url);
|
||||
httpPost.addHeader("Content-Type", "application/json");
|
||||
// 创建请求内容
|
||||
@@ -88,7 +88,7 @@ public class HttpService {
|
||||
}
|
||||
response = httpClient.execute(httpPost);
|
||||
result = EntityUtils.toString(response.getEntity(), "utf-8");
|
||||
log.info("【POST请求】 请求地址===>{}, 响应结果==={}", url, result);
|
||||
log.debug("【POST请求】 请求地址===>{}, 响应结果==={}", url, result);
|
||||
} catch (Exception e) {
|
||||
log.error("doPost异常", e);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user