Class AbstractAopMethodLogger


  • @Component
    public abstract class AbstractAopMethodLogger
    extends java.lang.Object
    Aspect: Logging method calls. Log all public service calls and all public repository calls.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void logMethodCall​(org.aspectj.lang.JoinPoint joinPoint)
      Logs the execution of a join point and of its parameters.
      java.lang.Object logMethodDuration​(org.aspectj.lang.ProceedingJoinPoint call)
      Logs duration of join points.
      abstract void methodsToBeLogged()
      implement this method in your project specific Aspect, defining method patterns as Pointcuts.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractAopMethodLogger

        public AbstractAopMethodLogger()
    • 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 java.lang.Object logMethodDuration​(org.aspectj.lang.ProceedingJoinPoint call)
                                           throws java.lang.Throwable
        Logs duration of join points. Logging is only active if LOGGER is at minimum debug level.
        Parameters:
        call - a proceeding joinpoint
        Returns:
        the next advice or target method invocation
        Throws:
        java.lang.Throwable - if error in proceeding