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 Summary
Modifier and TypeMethodDescriptiondefault void
appenderStarted
(Appender<Event> appender) Called when the given appender is started.default void
appenderStopped
(Appender<Event> appender) Called when the given appender is stopped.default void
eventAppended
(Appender<Event> appender, Event event, long durationInNanos) Called when the given event was successfully appended by the given appender.default void
eventAppendFailed
(Appender<Event> appender, Event event, Throwable reason) Called when the given event was failed to be appended by the given appender.
-
Method Details
-
appenderStarted
Called when the given appender is started.- Parameters:
appender
- the appender that was started
-
appenderStopped
Called when the given appender is stopped.- Parameters:
appender
- the appender that was stopped
-
eventAppended
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 eventevent
- the event that was appendeddurationInNanos
- the time (in nanoseconds) it took to append the event
-
eventAppendFailed
Called when the given event was failed to be appended by the given appender.- Parameters:
appender
- the appender when successfully appended the eventevent
- the event that was appendedreason
- what caused the failure
-