net.dpml.util
Class StandardFormatter

java.lang.Object
  extended byjava.util.logging.Formatter
      extended bynet.dpml.util.StandardFormatter

public class StandardFormatter
extends Formatter

Logging message formatter that includes the category in the logging statement.

Version:
1.0.1
Author:
Digital Product Meta Library

Constructor Summary
StandardFormatter()
           
 
Method Summary
 String format(LogRecord record)
          Format a LogRecord using a style appropriate for console messages.
 
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

StandardFormatter

public StandardFormatter()
Method Detail

format

public String format(LogRecord record)
Format a LogRecord using a style appropriate for console messages. The the log record message will be checked for a process identifier that is prepended to the raw message using the convention "$[" + PID + "] ". If a process id is resolved the value is assigned to the process block and the raw message is trimmed. The resulting formatted message is presented in the form "[PID ] [LEVEL ] (log.category): the message".

Parameters:
record - the log record to be formatted.
Returns:
a formatted log record