Class Routes
java.lang.Object
org.apache.logging.log4j.core.appender.routing.Routes
Contains the individual Route elements.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Configuration
private static final String
private static final Logger
private final String
private final AbstractScript
private final Route[]
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Routes
(Configuration configuration, AbstractScript patternScript, String pattern, Route... routes) -
Method Summary
Modifier and TypeMethodDescriptionstatic Routes
createRoutes
(String pattern, Route... routes) Deprecated.getPattern
(LogEvent event, ConcurrentMap<Object, Object> scriptStaticVariables) Returns the pattern.Gets the optional script that decides which route to pick.Route[]
Returns the array of Route elements.static Routes.Builder
toString()
-
Field Details
-
LOG_EVENT_KEY
- See Also:
-
LOGGER
-
configuration
-
pattern
-
patternScript
-
routes
-
-
Constructor Details
-
Routes
private Routes(Configuration configuration, AbstractScript patternScript, String pattern, Route... routes)
-
-
Method Details
-
createRoutes
Deprecated.since 2.7; usenewBuilder()
.Creates the Routes.- Parameters:
pattern
- The pattern.routes
- An array of Route elements.- Returns:
- The Routes container.
-
newBuilder
-
getPattern
Returns the pattern.- Parameters:
event
- The log event passed to the script (if there is a script.)scriptStaticVariables
- The script's static variables.- Returns:
- the pattern.
-
getPatternScript
Gets the optional script that decides which route to pick.- Returns:
- the optional script that decides which route to pick. May be null.
-
getRoute
-
getRoutes
Returns the array of Route elements.- Returns:
- an array of Route elements.
-
toString
-
newBuilder()
.