Appender, Filterable, LifeCycle, LifeCycle2@Plugin(name="Rewrite", category="Core", elementType="appender", printObject=true) public final class RewriteAppender 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) |
Modifies the event and pass to the subordinate Appenders.
|
static RewriteAppender |
createAppender(String name,
String ignore,
AppenderRef[] appenderRefs,
Configuration config,
RewritePolicy rewritePolicy,
Filter filter) |
Creates a RewriteAppender.
|
void |
start() |
Make the Filter available for use.
|
error, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, setHandler, toStringaddFilter, 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.@PluginFactory public static RewriteAppender createAppender(@PluginAttribute("name") String name, @PluginAttribute("ignoreExceptions") String ignore, @PluginElement("AppenderRef") AppenderRef[] appenderRefs, @PluginConfiguration Configuration config, @PluginElement("RewritePolicy") RewritePolicy rewritePolicy, @PluginElement("Filter") Filter filter)
name - The name of the Appender.ignore - If "true" (default) exceptions encountered when appending events are logged; otherwise
they are propagated to the caller.appenderRefs - An array of Appender names to call.config - The Configuration.rewritePolicy - The policy to use to modify the event.filter - A Filter to filter events.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.