JBoss Log Manager 1.5.6.Final

org.jboss.logmanager.formatters
Class PatternFormatter

java.lang.Object
  extended by java.util.logging.Formatter
      extended by org.jboss.logmanager.ExtFormatter
          extended by org.jboss.logmanager.formatters.MultistepFormatter
              extended by org.jboss.logmanager.formatters.PatternFormatter

public class PatternFormatter
extends MultistepFormatter

A formatter which uses a text pattern to format messages.


Constructor Summary
PatternFormatter()
          Construct a new instance.
PatternFormatter(String pattern)
          Construct a new instance.
PatternFormatter(String pattern, String colors)
          Construct a new instance.
 
Method Summary
 String getColors()
           
 String getPattern()
          Get the current format pattern.
 void setColors(String colors)
          Set the color map to use for log levels when %K{level} is used.
 void setPattern(String pattern)
          Set the format pattern.
 
Methods inherited from class org.jboss.logmanager.formatters.MultistepFormatter
format, getSteps, setSteps
 
Methods inherited from class org.jboss.logmanager.ExtFormatter
format
 
Methods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternFormatter

public PatternFormatter()
Construct a new instance.


PatternFormatter

public PatternFormatter(String pattern)
Construct a new instance.

Parameters:
pattern - the initial pattern

PatternFormatter

public PatternFormatter(String pattern,
                        String colors)
Construct a new instance.

Parameters:
pattern - the initial pattern
colors - the color map to use
Method Detail

getPattern

public String getPattern()
Get the current format pattern.

Returns:
the pattern

setPattern

public void setPattern(String pattern)
Set the format pattern.

Parameters:
pattern - the pattern

setColors

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 - a colormap expression string described above

getColors

public String getColors()

JBoss Log Manager 1.5.6.Final

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.