Class MethodLoggerAdapter

java.lang.Object
com.foreach.across.modules.logging.method.MethodLoggerAdapter
All Implemented Interfaces:
MethodLogger, org.springframework.core.Ordered

public abstract class MethodLoggerAdapter extends Object implements MethodLogger, org.springframework.core.Ordered
Base class to be implemented for a MethodLogger. Usually extended into an Aspect with the Around advice on proceedAndLogExecutionTime(ProceedingJoinPoint). The name of a logger must be unique.
Author:
Arne Vandamme
  • Constructor Details

    • MethodLoggerAdapter

      protected MethodLoggerAdapter(String name)
  • Method Details

    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
    • setOrder

      public void setOrder(int order)
    • getName

      public final String getName()
      Specified by:
      getName in interface MethodLogger
    • isEnabled

      public final boolean isEnabled()
      Specified by:
      isEnabled in interface MethodLogger
    • setEnabled

      public final void setEnabled(boolean enabled)
      Specified by:
      setEnabled in interface MethodLogger
    • getMinimumDuration

      public final int getMinimumDuration()
      Specified by:
      getMinimumDuration in interface MethodLogger
    • setMinimumDuration

      public final void setMinimumDuration(int minimumDuration)
      Specified by:
      setMinimumDuration in interface MethodLogger
    • proceedAndLogExecutionTime

      protected Object proceedAndLogExecutionTime(org.aspectj.lang.ProceedingJoinPoint point) throws Throwable
      Throws:
      Throwable
    • retrieveTypeName

      protected String retrieveTypeName(org.aspectj.lang.ProceedingJoinPoint point)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object