Module logstash.logback.encoder
Class FailureSummaryLoggingAppenderListener<Event extends DeferredProcessingAware>
java.lang.Object
net.logstash.logback.appender.listener.FailureSummaryAppenderListener<Event>
net.logstash.logback.appender.listener.FailureSummaryLoggingAppenderListener<Event>
- All Implemented Interfaces:
AppenderListener<Event>,TcpAppenderListener<Event>
public class FailureSummaryLoggingAppenderListener<Event extends DeferredProcessingAware>
extends FailureSummaryAppenderListener<Event>
A
TcpAppenderListener that logs a warning message on the first
append/send/connect success after a series of consecutive failures.
The warning message includes the number of consecutive failures,
the timestamp of the first failure,
and the duration between the first and last failures.
The default logger to which the event is sent is the fully qualified name of FailureSummaryLoggingAppenderListener,
and can be changed by calling setLoggerName(String).
-
Nested Class Summary
Nested classes/interfaces inherited from class net.logstash.logback.appender.listener.FailureSummaryAppenderListener
FailureSummaryAppenderListener.CallbackType, FailureSummaryAppenderListener.FailureSummary -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidhandleFailureSummary(FailureSummaryAppenderListener.FailureSummary failureSummary, FailureSummaryAppenderListener.CallbackType callbackType) Logs a message with the details from the givenFailureSummaryAppenderListener.FailureSummarywith the given callback type.voidsetLoggerName(String loggerName) Sets the slf4j logger name to which to log.Methods inherited from class net.logstash.logback.appender.listener.FailureSummaryAppenderListener
connectionFailed, connectionOpened, eventAppended, eventAppendFailed, eventSendFailure, eventSentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.logstash.logback.appender.listener.AppenderListener
appenderStarted, appenderStoppedMethods inherited from interface net.logstash.logback.appender.listener.TcpAppenderListener
connectionClosed
-
Constructor Details
-
FailureSummaryLoggingAppenderListener
public FailureSummaryLoggingAppenderListener()
-
-
Method Details
-
handleFailureSummary
protected void handleFailureSummary(FailureSummaryAppenderListener.FailureSummary failureSummary, FailureSummaryAppenderListener.CallbackType callbackType) Logs a message with the details from the givenFailureSummaryAppenderListener.FailureSummarywith the given callback type.- Specified by:
handleFailureSummaryin classFailureSummaryAppenderListener<Event extends DeferredProcessingAware>- Parameters:
failureSummary- contains summary details of all the consecutive failurescallbackType- the type of failure (append/send/connect)
-
getLoggerName
-
setLoggerName
Sets the slf4j logger name to which to log. Defaults to the fully qualified name ofFailureSummaryLoggingAppenderListener.- Parameters:
loggerName- the name of the logger to which to log.
-