public class PatternFormatter extends MultistepFormatter
Modifier and Type | Field and Description |
---|---|
private ColorMap |
colors |
private java.lang.String |
pattern |
Constructor and Description |
---|
PatternFormatter()
Construct a new instance.
|
PatternFormatter(java.lang.String pattern)
Construct a new instance.
|
PatternFormatter(java.lang.String pattern,
java.lang.String colors)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getColors() |
java.lang.String |
getPattern()
Get the current format pattern.
|
void |
setColors(java.lang.String colors)
Set the color map to use for log levels when %K{level} is used.
|
void |
setPattern(java.lang.String pattern)
Set the format pattern.
|
format, getSteps, setSteps
format
private volatile java.lang.String pattern
private volatile ColorMap colors
public PatternFormatter()
public PatternFormatter(java.lang.String pattern)
pattern
- the initial patternpublic PatternFormatter(java.lang.String pattern, java.lang.String colors)
pattern
- the initial patterncolors
- the color map to usepublic java.lang.String getPattern()
public void setPattern(java.lang.String pattern)
pattern
- the patternpublic void setColors(java.lang.String colors)
The format is level:color,level:color,...
Where level is either a numerical value or one of the following constants:
fatal |
error |
severe |
warn |
warning |
info |
config |
debug |
trace |
fine |
finer |
finest |
Color is one of the following constants:
clear |
black |
red |
green |
yellow |
blue |
magenta |
cyan |
white |
brightblack |
brightred |
brightgreen |
brightyellow |
brightblue |
brightmagenta |
brightcyan |
brightwhite |
colors
- a colormap expression string described abovepublic java.lang.String getColors()