REQ-2135: 合并日志
This commit is contained in:
parent
4e0c0fe836
commit
19c8b9d446
@ -37,20 +37,10 @@ public class PushClient {
|
||||
//String post1 = HttpUtil.post(url, postBody);
|
||||
cn.hutool.http.HttpResponse response = HttpUtil.createPost(url).header("User-Agent", USER_AGENT)
|
||||
.body(postBody).execute().charset("utf-8");
|
||||
log.info("HttpUtil url:{}", url);
|
||||
log.info("HttpUtil postBody:{}", postBody);
|
||||
|
||||
|
||||
int status = response.getStatus();
|
||||
log.info("Response Code : {}", status);
|
||||
String result = response.body();
|
||||
|
||||
log.info("Response body:{}", result);
|
||||
if (status == 200) {
|
||||
log.info("Notification sent successfully.");
|
||||
} else {
|
||||
log.info("Failed to send the notification!");
|
||||
}
|
||||
log.info("push response info, url={}, postBody={}, responseCode={}, responseBody={}, isSuccess={}",
|
||||
url, postBody, status, result, status == 200);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user