public class FailureSummaryLoggingAppenderListener<Event extends ch.qos.logback.core.spi.DeferredProcessingAware> extends FailureSummaryAppenderListener<Event>
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).
FailureSummaryAppenderListener.CallbackType, FailureSummaryAppenderListener.FailureSummary| Constructor and Description |
|---|
FailureSummaryLoggingAppenderListener() |
| Modifier and Type | Method and Description |
|---|---|
String |
getLoggerName() |
protected void |
handleFailureSummary(FailureSummaryAppenderListener.FailureSummary failureSummary,
FailureSummaryAppenderListener.CallbackType callbackType)
Logs a message with the details from the given
FailureSummary
with the given callback type. |
void |
setLoggerName(String loggerName)
Sets the slf4j logger name to which to log.
|
appenderStarted, appenderStopped, connectionClosed, connectionFailed, connectionOpened, eventAppended, eventAppendFailed, eventSendFailure, eventSentpublic FailureSummaryLoggingAppenderListener()
protected void handleFailureSummary(FailureSummaryAppenderListener.FailureSummary failureSummary, FailureSummaryAppenderListener.CallbackType callbackType)
FailureSummary
with the given callback type.handleFailureSummary in class FailureSummaryAppenderListener<Event extends ch.qos.logback.core.spi.DeferredProcessingAware>failureSummary - contains summary details of all the consecutive failurescallbackType - the type of failure (append/send/connect)public String getLoggerName()
public void setLoggerName(String loggerName)
FailureSummaryLoggingAppenderListener.loggerName - the name of the logger to which to log.Copyright © 2019. All rights reserved.