Class MarkerPatternSelector
- java.lang.Object
-
- org.apache.logging.log4j.core.layout.MarkerPatternSelector
-
- All Implemented Interfaces:
LocationAware
,PatternSelector
@Plugin(name="MarkerPatternSelector", category="Core", elementType="patternSelector", printObject=true) public class MarkerPatternSelector extends Object implements PatternSelector, LocationAware
Selects the pattern to use based on the Marker in the LogEvent.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MarkerPatternSelector.Builder
Custom MarkerPatternSelector builder.
-
Field Summary
-
Fields inherited from interface org.apache.logging.log4j.core.layout.PatternSelector
ELEMENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description MarkerPatternSelector(PatternMatch[] properties, String defaultPattern, boolean alwaysWriteExceptions, boolean noConsoleNoAnsi, Configuration config)
Deprecated.UsenewBuilder()
instead.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static MarkerPatternSelector
createSelector(PatternMatch[] properties, String defaultPattern, boolean alwaysWriteExceptions, boolean noConsoleNoAnsi, Configuration configuration)
Deprecated.UsenewBuilder()
instead.PatternFormatter[]
getFormatters(LogEvent event)
static MarkerPatternSelector.Builder
newBuilder()
Creates a builder for a custom ScriptPatternSelector.boolean
requiresLocation()
String
toString()
-
-
-
Constructor Detail
-
MarkerPatternSelector
@Deprecated public MarkerPatternSelector(PatternMatch[] properties, String defaultPattern, boolean alwaysWriteExceptions, boolean noConsoleNoAnsi, Configuration config)
Deprecated.UsenewBuilder()
instead. This will be private in a future version.
-
-
Method Detail
-
requiresLocation
public boolean requiresLocation()
- Specified by:
requiresLocation
in interfaceLocationAware
-
getFormatters
public PatternFormatter[] getFormatters(LogEvent event)
- Specified by:
getFormatters
in interfacePatternSelector
-
newBuilder
@PluginBuilderFactory public static MarkerPatternSelector.Builder newBuilder()
Creates a builder for a custom ScriptPatternSelector.- Returns:
- a ScriptPatternSelector builder.
-
createSelector
@Deprecated public static MarkerPatternSelector createSelector(PatternMatch[] properties, String defaultPattern, boolean alwaysWriteExceptions, boolean noConsoleNoAnsi, Configuration configuration)
Deprecated.UsenewBuilder()
instead.Deprecated, usenewBuilder()
instead.- Parameters:
properties
-defaultPattern
-alwaysWriteExceptions
-noConsoleNoAnsi
-configuration
-- Returns:
- a new MarkerPatternSelector.
-
-