Class LoggingInterceptor
- java.lang.Object
-
- net.cofcool.chaos.server.core.aop.AbstractScannedMethodInterceptor
-
- net.cofcool.chaos.server.core.aop.LoggingInterceptor
-
- All Implemented Interfaces:
ScannedMethodInterceptor
public class LoggingInterceptor extends AbstractScannedMethodInterceptor
记录日志, 包括http请求与返回值等。被代理类需使用Scanned注解。- Author:
- CofCool
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Loggerlog
-
Constructor Summary
Constructors Constructor Description LoggingInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringBuilderappendAfterLog(StringBuilder sb, Object returnValue)protected StringBuildercreatingLog(org.aopalliance.intercept.MethodInvocation invocation)protected voiddoAfter(org.aopalliance.intercept.MethodInvocation invocation, Object returnValue)invocation 调用后调用protected booleandoSupport(Method method, Class<?> targetClass)是否支持-
Methods inherited from class net.cofcool.chaos.server.core.aop.AbstractScannedMethodInterceptor
doBefore, postAfter, postBefore, supports
-
-
-
-
Method Detail
-
appendAfterLog
protected StringBuilder appendAfterLog(StringBuilder sb, Object returnValue)
-
creatingLog
protected StringBuilder creatingLog(org.aopalliance.intercept.MethodInvocation invocation)
-
doSupport
protected boolean doSupport(Method method, Class<?> targetClass)
Description copied from class:AbstractScannedMethodInterceptor是否支持- Specified by:
doSupportin classAbstractScannedMethodInterceptor- Parameters:
method- methodtargetClass- targetClass- Returns:
- 是否支持
-
doAfter
protected void doAfter(org.aopalliance.intercept.MethodInvocation invocation, Object returnValue) throws ThrowableDescription copied from class:AbstractScannedMethodInterceptorinvocation 调用后调用- Overrides:
doAfterin classAbstractScannedMethodInterceptor- Parameters:
invocation- invocationreturnValue- 方法返回值,当发生异常时为异常对象- Throws:
Throwable
-
-