Class AbstractLoggingAspect

  • Direct Known Subclasses:
    ActionLogger, RuleEvaluationLogger

    public abstract class AbstractLoggingAspect
    extends java.lang.Object
    Abstract class of Logging Aspect for intercepting calls of class methods and log it attributes. Method isEligibleForJoinPoint must be implemented in subclasses. Method(s) with Aspect annotations (ex. Before) have to be implemented in subclasses to specify joint-points to intercept and call logJoinPoint(...) in it. Subclasses have to have Aspect annotation to be able to act as Spring Aspect.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEBUG  
      static java.lang.String DEFAULT_LOG_LEVEL  
      static java.lang.String INFO  
      static java.lang.String TRACE  
      static java.lang.String WARN  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.slf4j.Logger getLogger()  
      protected java.lang.String getLogInfoFromArgs​(java.util.List<?> args)
      Returns String representation of argument set of intercepted method.
      protected java.lang.String getLogLevel()  
      protected java.lang.String getLongSignatureName​(org.aspectj.lang.JoinPoint joinPoint)  
      protected java.lang.String getSignatureName​(org.aspectj.lang.JoinPoint joinPoint)  
      protected abstract boolean isEligibleForJoinPoint​(org.aspectj.lang.JoinPoint joinPoint)
      Checks if the joinPoint is eligible to process.
      protected boolean isLoggingEligibleForJoinPoint​(org.aspectj.lang.JoinPoint joinPoint)
      Checks if the joinPoint is eligible for logging.
      protected void logAtDebugLevel​(java.lang.String signatureName, java.lang.String logInfo)  
      protected void logAtInfoLevel​(java.lang.String signatureName, java.lang.String logInfo)  
      protected void logAtTraceLevel​(java.lang.String signatureName, java.lang.String logInfo)  
      protected void logAtWarnLevel​(java.lang.String signatureName, java.lang.String logInfo)  
      protected void logJoinPoint​(org.aspectj.lang.JoinPoint joinPoint)
      Does logging for the intercepted joinPoint.
      void setLogLevel​(java.lang.String logLevel)  
      • Methods inherited from class java.lang.Object

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

      • AbstractLoggingAspect

        public AbstractLoggingAspect()
    • Method Detail

      • getLogger

        protected org.slf4j.Logger getLogger()
      • logJoinPoint

        protected void logJoinPoint​(org.aspectj.lang.JoinPoint joinPoint)
        Does logging for the intercepted joinPoint.
      • getSignatureName

        protected java.lang.String getSignatureName​(org.aspectj.lang.JoinPoint joinPoint)
      • getLongSignatureName

        protected java.lang.String getLongSignatureName​(org.aspectj.lang.JoinPoint joinPoint)
      • logAtDebugLevel

        protected void logAtDebugLevel​(java.lang.String signatureName,
                                       java.lang.String logInfo)
      • logAtTraceLevel

        protected void logAtTraceLevel​(java.lang.String signatureName,
                                       java.lang.String logInfo)
      • logAtInfoLevel

        protected void logAtInfoLevel​(java.lang.String signatureName,
                                      java.lang.String logInfo)
      • logAtWarnLevel

        protected void logAtWarnLevel​(java.lang.String signatureName,
                                      java.lang.String logInfo)
      • isLoggingEligibleForJoinPoint

        protected boolean isLoggingEligibleForJoinPoint​(org.aspectj.lang.JoinPoint joinPoint)
        Checks if the joinPoint is eligible for logging.
      • isEligibleForJoinPoint

        protected abstract boolean isEligibleForJoinPoint​(org.aspectj.lang.JoinPoint joinPoint)
        Checks if the joinPoint is eligible to process.
      • getLogInfoFromArgs

        protected java.lang.String getLogInfoFromArgs​(java.util.List<?> args)
        Returns String representation of argument set of intercepted method.
      • getLogLevel

        protected java.lang.String getLogLevel()
      • setLogLevel

        public void setLogLevel​(java.lang.String logLevel)