public abstract class AbstractStyleNameConverter extends LogEventPatternConverter
Modifier and Type | Class and Description |
---|---|
static class |
AbstractStyleNameConverter.Black
Black style pattern converter.
|
static class |
AbstractStyleNameConverter.Blue
Blue style pattern converter.
|
static class |
AbstractStyleNameConverter.Cyan
Cyan style pattern converter.
|
static class |
AbstractStyleNameConverter.Green
Green style pattern converter.
|
static class |
AbstractStyleNameConverter.Magenta
Magenta style pattern converter.
|
static class |
AbstractStyleNameConverter.Red
Red style pattern converter.
|
static class |
AbstractStyleNameConverter.White
White style pattern converter.
|
static class |
AbstractStyleNameConverter.Yellow
Yellow style pattern converter.
|
Modifier and Type | Field and Description |
---|---|
private java.util.List<PatternFormatter> |
formatters |
private java.lang.String |
style |
LOGGER
CATEGORY
Modifier | Constructor and Description |
---|---|
protected |
AbstractStyleNameConverter(java.lang.String name,
java.util.List<PatternFormatter> formatters,
java.lang.String styling)
Constructs the converter.
|
Modifier and Type | Method and Description |
---|---|
void |
format(LogEvent event,
java.lang.StringBuilder toAppendTo)
Formats an event into a string buffer.
|
protected static <T extends AbstractStyleNameConverter> |
newInstance(java.lang.Class<T> asnConverterClass,
java.lang.String name,
Configuration config,
java.lang.String[] options)
Gets an instance of the class (called via reflection).
|
private static java.util.List<PatternFormatter> |
toPatternFormatterList(Configuration config,
java.lang.String[] options)
Creates a list of PatternFormatter from the given configuration and options or null if no pattern is supplied.
|
format, handlesThrowable, isVariable
getName, getStyleClass
private final java.util.List<PatternFormatter> formatters
private final java.lang.String style
protected AbstractStyleNameConverter(java.lang.String name, java.util.List<PatternFormatter> formatters, java.lang.String styling)
formatters
- The PatternFormatters to generate the text to manipulate.styling
- The styling that should encapsulate the pattern.protected static <T extends AbstractStyleNameConverter> T newInstance(java.lang.Class<T> asnConverterClass, java.lang.String name, Configuration config, java.lang.String[] options)
config
- The current Configuration.options
- The pattern options, may be null. If the first element is "short", only the first line of the
throwable will be formatted.private static java.util.List<PatternFormatter> toPatternFormatterList(Configuration config, java.lang.String[] options)
config
- A configuration.options
- pattern options.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.