Class AopLogger
java.lang.Object
springboot.bg.harisauto.common.logger.AopLogger
AopLogger.java - Aspect that logs method entry, exit and thrown exceptions.
- Author:
- Kristian Popov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidlogAfter(org.aspectj.lang.JoinPoint joinPoint) Writes an EXIT message for every specified method call to the logger.voidlogAfterException(org.aspectj.lang.JoinPoint joinPoint, Throwable throwable) Writes information for a thrown Throwable to the logger.voidlogBefore(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.
-
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
Writes information for a thrown Throwable to the logger.- Parameters:
joinPoint- JoinPointthrowable- Throwable
-
logExecutionTime
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:
-