修改日志返回信息,增加请求服务出错
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user