@Plugin(name="encode", category="Converter") public final class EncodingPatternConverter extends LogEventPatternConverter
Modifier and Type | Class and Description |
---|---|
private static class |
EncodingPatternConverter.EscapeFormat |
Modifier and Type | Field and Description |
---|---|
private EncodingPatternConverter.EscapeFormat |
escapeFormat |
private java.util.List<PatternFormatter> |
formatters |
LOGGER
CATEGORY
Modifier | Constructor and Description |
---|---|
private |
EncodingPatternConverter(java.util.List<PatternFormatter> formatters,
EncodingPatternConverter.EscapeFormat escapeFormat)
Private constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
format(LogEvent event,
java.lang.StringBuilder toAppendTo)
Formats an event into a string buffer.
|
static EncodingPatternConverter |
newInstance(Configuration config,
java.lang.String[] options)
Creates an EncodingPatternConverter using a pattern string and an optional escape format.
|
format, handlesThrowable, isVariable
getName, getStyleClass
private final java.util.List<PatternFormatter> formatters
private final EncodingPatternConverter.EscapeFormat escapeFormat
private EncodingPatternConverter(java.util.List<PatternFormatter> formatters, EncodingPatternConverter.EscapeFormat escapeFormat)
formatters
- the PatternFormatters to generate the text to manipulate.escapeFormat
- the escape format strategy to use for encoding output of formatterspublic static EncodingPatternConverter newInstance(Configuration config, java.lang.String[] options)
config
- the current Configurationoptions
- first option is the nested pattern format; second option is the escape format (optional)public void format(LogEvent event, java.lang.StringBuilder toAppendTo)
format
in class LogEventPatternConverter
event
- event to format, may not be null.toAppendTo
- string buffer to which the formatted event will be appended. May not be null.