接口调用加入日志输出

This commit is contained in:
BinaryWang 2016-09-02 19:30:47 +08:00
parent ce58afc5da
commit fa51539e1e

View File

@ -6,6 +6,8 @@ import me.chanjar.weixin.common.util.http.SimplePostRequestExecutor;
import me.chanjar.weixin.mp.api.WxMpService; import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.api.WxMpUserTagService; import me.chanjar.weixin.mp.api.WxMpUserTagService;
import me.chanjar.weixin.mp.bean.tag.WxUserTag; import me.chanjar.weixin.mp.bean.tag.WxUserTag;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** /**
* *
@ -13,6 +15,7 @@ import me.chanjar.weixin.mp.bean.tag.WxUserTag;
* Created by Binary Wang on 2016/9/2. * Created by Binary Wang on 2016/9/2.
*/ */
public class WxMpUserTagServiceImpl implements WxMpUserTagService { public class WxMpUserTagServiceImpl implements WxMpUserTagService {
protected final Logger log = LoggerFactory.getLogger(WxMpDataCubeServiceImpl.class);
private static final String API_URL_PREFIX = "https://api.weixin.qq.com/cgi-bin/tags"; private static final String API_URL_PREFIX = "https://api.weixin.qq.com/cgi-bin/tags";
private WxMpService wxMpService; private WxMpService wxMpService;
@ -33,6 +36,7 @@ public class WxMpUserTagServiceImpl implements WxMpUserTagService {
new SimplePostRequestExecutor(), new SimplePostRequestExecutor(),
url, url,
json.toString()); json.toString());
this.log.debug("\nurl:{}\nparams:{}\nresponse:{}",url, name, responseContent);
return WxUserTag.fromJson(responseContent); return WxUserTag.fromJson(responseContent);
} }
} }