jwo.utils
Class JWLogFormatter

java.lang.Object
  extended by java.util.logging.Formatter
      extended by java.util.logging.SimpleFormatter
          extended by jwo.utils.JWLogFormatter

public class JWLogFormatter
extends SimpleFormatter

Creates a simple and terse formatting for Logger output. This is similar to the 'SimpleFormatter' provided as part of the standard class library, but does not display the originating class name and outputs each entry on a single line.

Version:
2.3, 3rd November, 2005.
Author:
Jo Wood

Constructor Summary
JWLogFormatter()
          Initialises the formatter.
 
Method Summary
 String format(LogRecord record)
          Formats output for the logger.
static String formatRecord(LogRecord record)
          Factory method that formats a given logging record.
 
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

JWLogFormatter

public JWLogFormatter()
Initialises the formatter.

Method Detail

format

public String format(LogRecord record)
Formats output for the logger.

Overrides:
format in class SimpleFormatter
Parameters:
record - Unformatted log information to be used to create output.
Returns:
Formatted version of the record.

formatRecord

public static String formatRecord(LogRecord record)
Factory method that formats a given logging record.

Parameters:
record - Unformatted log information to be used to create output.
Returns:
Formatted version of the record.


Copyright Jo Wood, 1996-2009, last modified, 17th April, 2009