Class AlhLoggingAspect

java.lang.Object
com.github.catomat0.aoploghelper.logging.AlhLoggingAspect
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

public class AlhLoggingAspect extends Object implements org.aopalliance.intercept.MethodInterceptor
Method interceptor that emits a single log line per invocation with class, method, (optionally masked) arguments, elapsed time, and — depending on outcome — the return value or exception message.

Wired as two advisors in AlhLoggingAutoConfiguration:

  • Configurable pointcut expression via alh.logging.pointcut.
  • Annotation matcher for LogExecution (forced on).
Method-level annotation overrides:
  • NoLog — bypasses logging even when matched.
  • LogSlow — overrides alh.logging.slow-threshold-ms.
  • Constructor Details

  • Method Details

    • invoke

      public Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws Throwable
      Specified by:
      invoke in interface org.aopalliance.intercept.MethodInterceptor
      Throws:
      Throwable