Appender, Filterable, LifeCycle, LifeCycle2@Plugin(name="Failover", category="Core", elementType="appender", printObject=true) public final class FailoverAppender extends AbstractAppender
AbstractAppender.Builder<B extends AbstractAppender.Builder<B>>LifeCycle.StateDEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGERELEMENT_TYPE| Modifier and Type | Method | Description |
|---|---|---|
void |
append(LogEvent event) |
Handle the Log event.
|
static FailoverAppender |
createAppender(String name,
String primary,
String[] failovers,
String retryIntervalSeconds,
Configuration config,
Filter filter,
String ignore) |
Create a Failover Appender.
|
void |
start() |
Make the Filter available for use.
|
String |
toString() |
error, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, setHandleraddFilter, getFilter, hasFilter, isFiltered, removeFilter, stop, stopequalsImpl, getState, getStatusLogger, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, stop, stoppublic void start()
AbstractFilterablestart in interface LifeCyclestart in class AbstractFilterablepublic void append(LogEvent event)
event - The LogEvent.public String toString()
toString in class AbstractAppender@PluginFactory public static FailoverAppender createAppender(@PluginAttribute("name") String name, @PluginAttribute("primary") String primary, @PluginElement("Failovers") String[] failovers, @PluginAliases("retryInterval") @PluginAttribute("retryIntervalSeconds") String retryIntervalSeconds, @PluginConfiguration Configuration config, @PluginElement("Filter") Filter filter, @PluginAttribute("ignoreExceptions") String ignore)
name - The name of the Appender (required).primary - The name of the primary Appender (required).failovers - The name of one or more Appenders to fail over to (at least one is required).retryIntervalSeconds - The retry interval in seconds.config - The current Configuration (passed by the Configuration when the appender is created).filter - A Filter (optional).ignore - If "true" (default) exceptions encountered when appending events are logged; otherwise
they are propagated to the caller.Copyright © 1999-2018. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.