Class EventLoggingInterceptor

java.lang.Object
org.axonframework.eventhandling.interceptors.EventLoggingInterceptor
All Implemented Interfaces:
MessageDispatchInterceptor<EventMessage<?>>

public class EventLoggingInterceptor extends Object implements MessageDispatchInterceptor<EventMessage<?>>
Message Dispatch Interceptor that logs published events to a SLF4J logger. It does not alter or reject events.

The interceptor also logs the cause of the published events. E.g. if the cause of the events is a command, the interceptor also logs the command and the execution result of the command.

The interceptor allows for configuration of the name under which the logger should log the statements. All logging is done at the INFO level.

Since:
3.0
Author:
Rene de Waele
  • Constructor Details

    • EventLoggingInterceptor

      public EventLoggingInterceptor()
      Initialize the LoggingInterceptor with the default logger name, which is the fully qualified class name of this logger.
      See Also:
    • EventLoggingInterceptor

      public EventLoggingInterceptor(String loggerName)
      Initialize the interceptor with the given loggerName. The actual logging implementation will use this name to decide the appropriate log level and location. See the documentation of your logging implementation for more information.
      Parameters:
      loggerName - the name of the logger
  • Method Details