server sdk http request add log

This commit is contained in:
heavyrian2012
2023-01-04 09:20:12 +08:00
parent cc561b846e
commit 6e83ec85c7
3 changed files with 3 additions and 3 deletions
@@ -128,7 +128,7 @@ public class AdminHttpUtils extends JsonUtils {
if (object != null) {
jsonStr = gson.toJson(object);
}
LOG.info("http request content: {}", jsonStr);
LOG.info("http request:{} content: {}", path, jsonStr);
StringEntity entity = new StringEntity(jsonStr, Charset.forName("UTF-8"));
entity.setContentEncoding("UTF-8");
@@ -78,7 +78,7 @@ public class ChannelHttpUtils extends JsonUtils {
if (object != null) {
jsonStr = gson.toJson(object);
}
LOG.info("http request content: {}", jsonStr);
LOG.info("http request:{} content: {}", path, jsonStr);
StringEntity entity = new StringEntity(jsonStr, Charset.forName("UTF-8"));
entity.setContentEncoding("UTF-8");
@@ -79,7 +79,7 @@ public class RobotHttpUtils extends JsonUtils {
if (object != null) {
jsonStr = gson.toJson(object);
}
LOG.info("http request content: {}", jsonStr);
LOG.info("http request:{} content: {}", path, jsonStr);
if(!StringUtil.isNullOrEmpty(jsonStr)) {
StringEntity entity = new StringEntity(jsonStr, Charset.forName("UTF-8"));