spring-framework / org.springframework.aop.interceptor / DebugInterceptor

DebugInterceptor

open class DebugInterceptor : SimpleTraceInterceptor

AOP Alliance MethodInterceptor that can be introduced in a chain to display verbose information about intercepted invocations to the logger.

Logs full invocation details on method entry and method exit, including invocation arguments and invocation count. This is only intended for debugging purposes; use SimpleTraceInterceptor or CustomizableTraceInterceptor for pure tracing purposes.

Author
Rod Johnson

Author
Juergen Hoeller

See Also
SimpleTraceInterceptorCustomizableTraceInterceptor

Constructors

<init>

DebugInterceptor()

Create a new DebugInterceptor with a static logger.

DebugInterceptor(useDynamicLogger: Boolean)

Create a new DebugInterceptor with dynamic or static logger, according to the given flag.

Functions

getCount

open fun getCount(): Long

Return the number of times this interceptor has been invoked.

invoke

open fun invoke(invocation: MethodInvocation): Any

resetCount

open fun resetCount(): Unit

Reset the invocation count to zero.