org.ow2.orchestra.util
Class TraceFormatter

java.lang.Object
  extended by java.util.logging.Formatter
      extended by java.util.logging.SimpleFormatter
          extended by org.ow2.orchestra.util.TraceFormatter

public class TraceFormatter
extends SimpleFormatter

Custom implementation of the SimpleFormatter class.

This implementation produce the following pattern:

L DATE thr#Id Logger Class.Method(): MSG
where:

Since:
1.0
Version:
$Revision: 1.4 $
Author:
eipi

Field Summary
static String ALIAS_HELP
           
static String ALIAS_PROPERTY_KEY
           
static String LEGEND_MSG
           
static String UNAVAILABLE_SYMBOL
           
 
Constructor Summary
TraceFormatter()
           
 
Method Summary
 String format(LogRecord record)
           
static String formatTime(long time)
          Returns a "concise" ISO-8601 "like" time format: yy-MM-dd HH:mm:ss.SSS z This method is thread-safe.
 
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
 

Field Detail

UNAVAILABLE_SYMBOL

public static final String UNAVAILABLE_SYMBOL
See Also:
Constant Field Values

ALIAS_PROPERTY_KEY

public static final String ALIAS_PROPERTY_KEY

LEGEND_MSG

public static final String LEGEND_MSG

ALIAS_HELP

public static final String ALIAS_HELP
Constructor Detail

TraceFormatter

public TraceFormatter()
Method Detail

format

public String format(LogRecord record)
Overrides:
format in class SimpleFormatter

formatTime

public static String formatTime(long time)
Returns a "concise" ISO-8601 "like" time format: yy-MM-dd HH:mm:ss.SSS z This method is thread-safe.

Parameters:
time -
Returns:
a string using the format yy-MM-dd HH:mm:ss.SSS z representing the given date.


Copyright © 2011 OW2 Consortium. All Rights Reserved.