Commit 5e4509aa by ping.wu

Merge branch 'feature/20210720-购物车日志修改-张志恒' of…

Merge branch 'feature/20210720-购物车日志修改-张志恒' of http://gitlab.freemud.com/order-group-application/order-group into feature/20210720-购物车日志修改-张志恒
parents cf67257d 82f78c45
...@@ -228,13 +228,11 @@ public class WebAspect { ...@@ -228,13 +228,11 @@ public class WebAspect {
String messageValue = "ignore"; String messageValue = "ignore";
// 打印第三方出参日志 // 打印第三方出参日志
IgnoreFeignLogAnnotation logIgnore = currentMethod.getAnnotation(IgnoreFeignLogAnnotation.class); if (!this.printFeignResponseBodyLog) {
IgnoreFeignLogAnnotation logIgnore = currentMethod.getAnnotation(IgnoreFeignLogAnnotation.class);
if (logIgnore != null) { if (logIgnore != null && logIgnore.printLog()) {
statusCodeValue = org.apache.commons.beanutils.BeanUtils.getProperty(result, logIgnore.statusCodeFieldName()); statusCodeValue = org.apache.commons.beanutils.BeanUtils.getProperty(result, logIgnore.statusCodeFieldName());
messageValue = org.apache.commons.beanutils.BeanUtils.getProperty(result, logIgnore.messageFieldName()); messageValue = org.apache.commons.beanutils.BeanUtils.getProperty(result, logIgnore.messageFieldName());
if (!this.printFeignResponseBodyLog || logIgnore.printLog()) {
//todo 当排除了这个状态码不打印响应的具体内容只会打印状态码和状态描述信息 //todo 当排除了这个状态码不打印响应的具体内容只会打印状态码和状态描述信息
String[] excludeStatusCodes = logIgnore.excludeStatusCodes(); String[] excludeStatusCodes = logIgnore.excludeStatusCodes();
if (!StringUtils.isEmpty(statusCodeValue) && this.containStatusCode(excludeStatusCodes, statusCodeValue)) { if (!StringUtils.isEmpty(statusCodeValue) && this.containStatusCode(excludeStatusCodes, statusCodeValue)) {
...@@ -244,9 +242,7 @@ public class WebAspect { ...@@ -244,9 +242,7 @@ public class WebAspect {
} }
} }
} }
ThirdPartyLog.infoConvertJson(statusCodeValue, messageValue, start, System.currentTimeMillis(), ThirdPartyLog.infoConvertJson(statusCodeValue, messageValue, start, System.currentTimeMillis(), thirdPartLogVo.getUri(), thirdPartLogVo.getRequestBody(), logReult);
thirdPartLogVo.getUri(), thirdPartLogVo.getRequestBody(), logReult);
} }
} catch (Exception e) { } catch (Exception e) {
ShoppingSdkLogUtil.errorLog("WebAspect Feign Log Ignore error {}",e, null); ShoppingSdkLogUtil.errorLog("WebAspect Feign Log Ignore error {}",e, null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment