Module logstash.logback.encoder
Interface TcpAppenderListener<Event extends DeferredProcessingAware>
- All Superinterfaces:
AppenderListener<Event>
- All Known Implementing Classes:
AccessEventTcpAppenderListenerImpl,FailureSummaryAppenderListener,FailureSummaryLoggingAppenderListener,LoggingEventTcpAppenderListenerImpl
public interface TcpAppenderListener<Event extends DeferredProcessingAware>
extends AppenderListener<Event>
Listens to a TCP appender.
Methods will be invoked in the thread that is sending the events over the TCP connection.
Therefore, ensure that the methods complete quickly, so that future events are not delayed.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidconnectionClosed(Appender<Event> appender, Socket socket) Called after the given appender closes the given socket (either due to a reconnect, or shutdown)default voidconnectionFailed(Appender<Event> appender, InetSocketAddress address, Throwable reason) Called after the given appender fails to open a socketdefault voidconnectionOpened(Appender<Event> appender, Socket socket) Called after the given appender successfully opens the given socketdefault voideventSendFailure(Appender<Event> appender, Event event, Throwable reason) Called when the given appender fails to send the given event over a TCP connection.default voidCalled after given appender successfully sent the given event over the TCP connection.Methods inherited from interface net.logstash.logback.appender.listener.AppenderListener
appenderStarted, appenderStopped, eventAppended, eventAppendFailed
-
Method Details
-
eventSent
Called after given appender successfully sent the given event over the TCP connection.- Parameters:
appender- the appender that sent the eventsocket- the socket over which the appender sent the eventevent- the event that was sentdurationInNanos- the time (in nanoseconds) it took to send the event
-
eventSendFailure
Called when the given appender fails to send the given event over a TCP connection.- Parameters:
appender- the appender that attempted to send the eventevent- the event that failed to sendreason- what caused the failure
-
connectionOpened
Called after the given appender successfully opens the given socket- Parameters:
appender- the appender that opened the socketsocket- the socket that was opened
-
connectionFailed
default void connectionFailed(Appender<Event> appender, InetSocketAddress address, Throwable reason) Called after the given appender fails to open a socket- Parameters:
appender- the appender that attempted to open a socketaddress- the address to which the appender attempted to connectreason- what caused the failure
-
connectionClosed
Called after the given appender closes the given socket (either due to a reconnect, or shutdown)- Parameters:
appender- the appender that closed the socketsocket- the socket that was closed
-