Top Description Fields Constructors Methods
org.jboss.logmanager.formatters

public Class PatternFormatter

extends MultistepFormatter
Class Inheritance
Known Direct Subclasses
org.jboss.logmanager.formatters.ColorPatternFormatter

A formatter which uses a text pattern to format messages.

Field Summary

Modifier and TypeField and Description
private volatile ColorMap
private volatile String

Constructor Summary

AccessConstructor and Description
public
PatternFormatter()

Construct a new instance.

public
PatternFormatter(String
the initial pattern
pattern
)

Construct a new instance.

public
PatternFormatter(String
the initial pattern
pattern
,
String
the color map to use
colors
)

Construct a new instance.

Method Summary

Modifier and TypeMethod and Description
public String
public String

Returns:

the pattern
getPattern
()

Get the current format pattern.

public void
setColors(String
a colormap expression string described above
colors
)

Set the color map to use for log levels when %K{level} is used.

public void
setPattern(final String
the pattern
pattern
)

Set the format pattern.

Inherited from org.jboss.logmanager.formatters.MultistepFormatter:
formatgetStepsisCallerCalculationRequiredsetSteps

Field Detail

colorsback to summary
private volatile ColorMap colors
patternback to summary
private volatile String pattern

Constructor Detail

PatternFormatterback to summary
public PatternFormatter()

Construct a new instance.

PatternFormatterback to summary
public PatternFormatter(String pattern)

Construct a new instance.

Parameters
pattern:String

the initial pattern

PatternFormatterback to summary
public PatternFormatter(String pattern, String colors)

Construct a new instance.

Parameters
pattern:String

the initial pattern

colors:String

the color map to use

Method Detail

getColorsback to summary
public String getColors()
getPatternback to summary
public String getPattern()

Get the current format pattern.

Returns:String

the pattern

setColorsback to summary
public void setColors(String colors)

Set the color map to use for log levels when %K{level} is used.

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
Parameters
colors:String

a colormap expression string described above

setPatternback to summary
public void setPattern(final String pattern)

Set the format pattern.

Parameters
pattern:String

the pattern