|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.logging.log4j.core.filter.Filterable
org.apache.logging.log4j.core.appender.AppenderBase
org.apache.logging.log4j.core.appender.routing.RoutingAppender
public final class RoutingAppender
This Appender "routes" between various Appenders, some of which can be references to Appenders defined earlier in the configuration while others can be dynamically created within this Appender as required. Routing is achieved by specifying a pattern on the Routing appender declaration. The pattern should contain one or more substitution patterns of the form "$${[key:]token}". The pattern will be resolved each time the Appender is called using the built in StrSubstitutor and the StrLookup plugin that matches the specified key.
Field Summary |
---|
Fields inherited from class org.apache.logging.log4j.core.appender.AppenderBase |
---|
LOGGER |
Method Summary | |
---|---|
void |
append(LogEvent event)
Log in Appender specific way. |
static RoutingAppender |
createAppender(String name,
String suppress,
Routes routes,
Configuration config,
RewritePolicy rewritePolicy,
Filter filter)
Create a RoutingAppender. |
void |
start()
Start the Appender. |
void |
stop()
Stop the Appender. |
Methods inherited from class org.apache.logging.log4j.core.appender.AppenderBase |
---|
close, error, error, error, getHandler, getLayout, getName, isExceptionSuppressed, isStarted, setHandler, toString |
Methods inherited from class org.apache.logging.log4j.core.filter.Filterable |
---|
addFilter, getFilter, hasFilter, isFiltered, removeFilter, startFilter, stopFilter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public void start()
AppenderBase
start
in interface Lifecycle
start
in class AppenderBase
public void stop()
AppenderBase
stop
in interface Lifecycle
stop
in class AppenderBase
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.public static RoutingAppender createAppender(String name, String suppress, Routes routes, Configuration config, RewritePolicy rewritePolicy, Filter filter)
name
- The name of the Appender.suppress
- "true" if exceptions should be hidden from the application, "false" otherwise.
The default is "true".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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |