修改日志返回信息,增加请求服务出错

This commit is contained in:
zhanghongqing
2018-09-12 17:30:32 +08:00
parent fc8c9951c8
commit 745713979b
2 changed files with 6 additions and 2 deletions

View File

@@ -222,9 +222,10 @@ public class HttpClientUtil {
// result = EntityUtils.toString(response.getEntity());
//调用处理数据方法
result = galaxyMessageFormat(result);
logger.debug("获取消息成功,相应内容如下: " + result);
logger.info("获取消息成功,相应内容如下: " + result);
} else {
logger.error("获取消息失败,相应内容如下: " + result);
throw new MaatConvertException(status+"");
}
} /*catch (SocketTimeoutException e) {
@@ -237,8 +238,9 @@ public class HttpClientUtil {
throw new MaatConvertException(requestContext.getMessage("request_service_failed") + ":timeout");
}*/ catch (Exception e) {
e.printStackTrace();
logger.error("获取消息失败,相应内容如下: " + result);
logger.error("获取消息失败 ", e);
throw new MaatConvertException(requestContext.getMessage("request_service_failed"));
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:");
} /*finally {
try {
if (response != null) {