diff --git a/mallinkService/src/main/java/com/iformall/douyin/web/api/TtWebPostRequestExecutor.java b/mallinkService/src/main/java/com/iformall/douyin/web/api/TtWebPostRequestExecutor.java index 53acf6e64..a3246b981 100644 --- a/mallinkService/src/main/java/com/iformall/douyin/web/api/TtWebPostRequestExecutor.java +++ b/mallinkService/src/main/java/com/iformall/douyin/web/api/TtWebPostRequestExecutor.java @@ -17,6 +17,8 @@ import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.regex.Matcher; @@ -29,6 +31,7 @@ import java.util.regex.Pattern; * @date 2017/5/4 */ public class TtWebPostRequestExecutor implements RequestExecutor { + private final Logger logger = LoggerFactory.getLogger(this.getClass()); protected RequestHttp requestHttp; public TtWebPostRequestExecutor(RequestHttp requestHttp) { @@ -43,7 +46,8 @@ public class TtWebPostRequestExecutor implements RequestExecutor @Override public String execute(String uri, String postEntity, WxType wxType) throws WxErrorException, IOException { - + logger.info("uri{}"+uri); + logger.info("request{}"+postEntity); String access_token = handleUrl(uri); if(StringUtils.isBlank(access_token)){ WxError wxError = WxError.fromJson("{\n" + @@ -70,6 +74,7 @@ public class TtWebPostRequestExecutor implements RequestExecutor try (CloseableHttpResponse response = requestHttp.getRequestHttpClient().execute(httpPost)) { String responseContent = Utf8ResponseHandler.INSTANCE.handleResponse(response); + logger.info("response{}"+responseContent); if (responseContent.isEmpty()) { throw new WxErrorException(WxError.builder().errorCode(9999).errorMsg("无响应内容").build()); }