Class AbstractAopMethodLogger
- java.lang.Object
-
- de.digitalcollections.commons.springaop.AbstractAopMethodLogger
-
@Component public abstract class AbstractAopMethodLogger extends Object
Aspect: Logging method calls. Log all public service calls and all public repository calls.
-
-
Constructor Summary
Constructors Constructor Description AbstractAopMethodLogger()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidlogMethodCall(org.aspectj.lang.JoinPoint joinPoint)Logs the execution of a join point and of its parameters.ObjectlogMethodDuration(org.aspectj.lang.ProceedingJoinPoint call)Logs duration of join points.abstract voidmethodsToBeLogged()implement this method in your project specific Aspect, defining method patterns as Pointcuts.
-
-
-
Method Detail
-
methodsToBeLogged
public abstract void methodsToBeLogged()
implement this method in your project specific Aspect, defining method patterns as Pointcuts.
-
logMethodCall
public void logMethodCall(org.aspectj.lang.JoinPoint joinPoint)
Logs the execution of a join point and of its parameters. Parameters are only logged if not null.In aspect-oriented programming a set of join points is called a pointcut. A join point is a specification of when, in the corresponding main program, the aspect code should be executed. The join point is a point of execution in the base code where the advice specified in a corresponding pointcut is applied.
- Parameters:
joinPoint- the event of the advice
-
logMethodDuration
public Object logMethodDuration(org.aspectj.lang.ProceedingJoinPoint call) throws Throwable
Logs duration of join points. Logging is only active ifLOGGERis at minimum debug level.- Parameters:
call- a proceeding joinpoint- Returns:
- the next advice or target method invocation
- Throws:
Throwable- if error in proceeding
-
-