|
@@ -5,6 +5,7 @@ import com.tzld.piaoquan.ad.engine.commons.util.JSONUtils;
|
|
import com.tzld.piaoquan.ad.engine.commons.util.TraceUtils;
|
|
import com.tzld.piaoquan.ad.engine.commons.util.TraceUtils;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.aspectj.lang.ProceedingJoinPoint;
|
|
import org.aspectj.lang.ProceedingJoinPoint;
|
|
|
|
+import org.aspectj.lang.annotation.AfterThrowing;
|
|
import org.aspectj.lang.annotation.Around;
|
|
import org.aspectj.lang.annotation.Around;
|
|
import org.aspectj.lang.annotation.Aspect;
|
|
import org.aspectj.lang.annotation.Aspect;
|
|
import org.aspectj.lang.annotation.Pointcut;
|
|
import org.aspectj.lang.annotation.Pointcut;
|
|
@@ -42,11 +43,13 @@ public class ControllerAspect {
|
|
JSONUtils.toJson(pjp.getArgs()));
|
|
JSONUtils.toJson(pjp.getArgs()));
|
|
Object result = pjp.proceed();
|
|
Object result = pjp.proceed();
|
|
if (result != null && result instanceof String) {
|
|
if (result != null && result instanceof String) {
|
|
- log.info("response result=[{}] cost=[{}]", result, stopwatch.stop().elapsed(TimeUnit.MILLISECONDS));
|
|
|
|
|
|
+ log.info("request method=[{}] param=[{}] result=[{}] cost=[{}]", signature.getName(),JSONUtils.toJson(pjp.getArgs()),result, stopwatch.stop().elapsed(TimeUnit.MILLISECONDS));
|
|
} else {
|
|
} else {
|
|
- log.info("response result=[{}] cost=[{}]", JSONUtils.toJson(result), stopwatch.stop().elapsed(TimeUnit.MILLISECONDS));
|
|
|
|
|
|
+ log.info("request method=[{}] param=[{}] result=[{}] cost=[{}]", signature.getName(),JSONUtils.toJson(pjp.getArgs()), JSONUtils.toJson(result), stopwatch.stop().elapsed(TimeUnit.MILLISECONDS));
|
|
}
|
|
}
|
|
TraceUtils.removeMDC();
|
|
TraceUtils.removeMDC();
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|