|
@@ -54,9 +54,9 @@ public class ApiControllerAspect {
|
|
|
Object[] args = joinPoint.getArgs();
|
|
|
String[] paramsName = msig.getParameterNames();
|
|
|
HttpServletRequest request = ServletUtil.getRequest();
|
|
|
- log.info("============请求地址========:{}", request.getServletPath());
|
|
|
- log.info("============类=============:{}", className);
|
|
|
- log.info("============方法===========:{}", methodName);
|
|
|
+ log.info("============request path========:{}", request.getServletPath());
|
|
|
+ log.info("============class name=============:{}", className);
|
|
|
+ log.info("============invoke method===========:{}", methodName);
|
|
|
if (Objects.nonNull(args) && args.length > 0) {
|
|
|
boolean jsonOut = true;
|
|
|
for (Object o : args) {
|
|
@@ -66,11 +66,11 @@ public class ApiControllerAspect {
|
|
|
}
|
|
|
}
|
|
|
if (jsonOut) {
|
|
|
- log.info("============参数key:{},参数value===========:{}", JacksonUtil.parseJson(paramsName),
|
|
|
+ log.info("============parameter key:{},value:{}===========", JacksonUtil.parseJson(paramsName),
|
|
|
JacksonUtil.parseJson(args));
|
|
|
} else {
|
|
|
for (int i = 0; i < args.length; i++) {
|
|
|
- log.info("============参数key:{},参数value===========:{}", paramsName[i], args[i]);
|
|
|
+ log.info("============parameter key:{},value:{}===========", paramsName[i], args[i]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -80,10 +80,10 @@ public class ApiControllerAspect {
|
|
|
//log.info("============time===========:{}", ServletUtil.getRequestTimeForTime());
|
|
|
Object proceed = joinPoint.proceed();
|
|
|
long end = System.currentTimeMillis();
|
|
|
- log.info("============耗时============:{}秒", (end - start) / 1000);
|
|
|
+ log.info("============api time cost============:{} seconds", (end - start) / 1000);
|
|
|
return proceed;
|
|
|
} catch (Exception e) {
|
|
|
- log.error("请求出错", e);
|
|
|
+ log.error("Api exception", e);
|
|
|
if (e instanceof BusinessException) {
|
|
|
return ResultUtil.error((BusinessException) e, e.getMessage());
|
|
|
} else {
|