Interface AppenderListener<Event extends DeferredProcessingAware>

All Known Subinterfaces:
TcpAppenderListener<Event>
All Known Implementing Classes:
AccessEventAppenderListenerImpl, AccessEventTcpAppenderListenerImpl, FailureSummaryAppenderListener, FailureSummaryLoggingAppenderListener, LoggingEventAppenderListenerImpl, LoggingEventTcpAppenderListenerImpl

public interface AppenderListener<Event extends DeferredProcessingAware>
Listens to an appender. For example, a listener implementation could be created for metrics or dynamic error handling.
  • Method Details

    • appenderStarted

      default void appenderStarted(Appender<Event> appender)
      Called when the given appender is started.
      Parameters:
      appender - the appender that was started
    • appenderStopped

      default void appenderStopped(Appender<Event> appender)
      Called when the given appender is stopped.
      Parameters:
      appender - the appender that was stopped
    • eventAppended

      default void eventAppended(Appender<Event> appender, Event event, long durationInNanos)
      Called when the given event was successfully appended by the given appender. Note that for Asynchronous appenders, this generally means that the event was accepted for processing, but hasn't finished processing yet.
      Parameters:
      appender - the appender when successfully appended the event
      event - the event that was appended
      durationInNanos - the time (in nanoseconds) it took to append the event
    • eventAppendFailed

      default void eventAppendFailed(Appender<Event> appender, Event event, Throwable reason)
      Called when the given event was failed to be appended by the given appender.
      Parameters:
      appender - the appender when successfully appended the event
      event - the event that was appended
      reason - what caused the failure