@Plugin(name="replace", category="Converter") public final class RegexReplacementConverter extends LogEventPatternConverter
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<PatternFormatter> |
formatters |
private java.util.regex.Pattern |
pattern |
private java.lang.String |
substitution |
LOGGERCATEGORY| Modifier | Constructor and Description |
|---|---|
private |
RegexReplacementConverter(java.util.List<PatternFormatter> formatters,
java.util.regex.Pattern pattern,
java.lang.String substitution)
Construct the converter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
format(LogEvent event,
java.lang.StringBuilder toAppendTo)
Formats an event into a string buffer.
|
static RegexReplacementConverter |
newInstance(Configuration config,
java.lang.String[] options)
Gets an instance of the class.
|
format, handlesThrowable, isVariablegetName, getStyleClassprivate final java.util.regex.Pattern pattern
private final java.lang.String substitution
private final java.util.List<PatternFormatter> formatters
private RegexReplacementConverter(java.util.List<PatternFormatter> formatters, java.util.regex.Pattern pattern, java.lang.String substitution)
formatters - The PatternFormatters to generate the text to manipulate.pattern - The regular expression Pattern.substitution - The substitution string.public static RegexReplacementConverter newInstance(Configuration config, java.lang.String[] options)
config - The current Configuration.options - pattern options, may be null. If first element is "short",
only the first line of the throwable will be formatted.public void format(LogEvent event, java.lang.StringBuilder toAppendTo)
format in class LogEventPatternConverterevent - event to format, may not be null.toAppendTo - string buffer to which the formatted event will be appended. May not be null.