@Plugin(name="Routing", category="Core", elementType="appender", printObject=true) public final class RoutingAppender extends AbstractAppender
LifeCycle.State
LOGGER
Modifier and Type | Method and Description |
---|---|
void |
append(LogEvent event)
Log in
Appender specific way. |
static RoutingAppender |
createAppender(String name,
String ignore,
Routes routes,
Configuration config,
RewritePolicy rewritePolicy,
Filter filter)
Create a RoutingAppender.
|
void |
start()
Make the Filter available for use.
|
void |
stop()
Cleanup the Filter.
|
error, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, setHandler, toString
addFilter, getFilter, hasFilter, isFiltered, removeFilter
getState, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping
public void start()
AbstractFilterable
start
in interface LifeCycle
start
in class AbstractFilterable
public void stop()
AbstractFilterable
stop
in interface LifeCycle
stop
in class AbstractFilterable
public void append(LogEvent event)
Appender
Appender
specific way. When appropriate,
Loggers will call the doAppend
method of appender
implementations in order to log.event
- The LogEvent.@PluginFactory public static RoutingAppender createAppender(@PluginAttribute(value="name") String name, @PluginAttribute(value="ignoreExceptions") String ignore, @PluginElement(value="Routes") Routes routes, @PluginConfiguration Configuration config, @PluginElement(value="RewritePolicy") RewritePolicy rewritePolicy, @PluginElement(value="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.routes
- The routing definitions.config
- The Configuration (automatically added by the Configuration).rewritePolicy
- A RewritePolicy, if any.filter
- A Filter to restrict events processed by the Appender or null.Copyright © 1999-2018 Apache Software Foundation. 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.