Class AopLogger

java.lang.Object
springboot.bg.harisauto.common.logger.AopLogger

@Component public class AopLogger extends Object
AopLogger.java - Aspect that logs method entry, exit and thrown exceptions.
Author:
Kristian Popov
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    logAfter(org.aspectj.lang.JoinPoint joinPoint)
    Writes an EXIT message for every specified method call to the logger.
    void
    logAfterException(org.aspectj.lang.JoinPoint joinPoint, Throwable throwable)
    Writes information for a thrown Throwable to the logger.
    void
    logBefore(org.aspectj.lang.JoinPoint joinPoint)
    Writes an ENTER message for every specified method call to the logger.
    logExecutionTime(org.aspectj.lang.ProceedingJoinPoint joinPoint)
    Returns any method result value after logging execution time.

    Methods inherited from class java.lang.Object

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

    • AopLogger

      public AopLogger()
  • Method Details

    • logBefore

      public void logBefore(org.aspectj.lang.JoinPoint joinPoint)
      Writes an ENTER message for every specified method call to the logger.
      Parameters:
      joinPoint - JoinPoint
    • logAfter

      public void logAfter(org.aspectj.lang.JoinPoint joinPoint)
      Writes an EXIT message for every specified method call to the logger.
      Parameters:
      joinPoint - JoinPoint
    • logAfterException

      public void logAfterException(org.aspectj.lang.JoinPoint joinPoint, Throwable throwable)
      Writes information for a thrown Throwable to the logger.
      Parameters:
      joinPoint - JoinPoint
      throwable - Throwable
    • logExecutionTime

      public Object logExecutionTime(org.aspectj.lang.ProceedingJoinPoint joinPoint) throws Throwable
      Returns any method result value after logging execution time.
      Parameters:
      joinPoint - ProceedingJoinPoint
      Returns:
      Object
      Throws:
      Throwable - on anything that might be thrown during execution of the target method
      See Also: