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 java.util.logging.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 java.lang.String ALIAS_HELP
           
static java.lang.String ALIAS_PROPERTY_KEY
           
static java.lang.String LEGEND_MSG
           
static java.lang.String UNAVAILABLE_SYMBOL
           
 
Constructor Summary
TraceFormatter()
           
 
Method Summary
 java.lang.String format(java.util.logging.LogRecord record)
           
static java.lang.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 java.lang.String UNAVAILABLE_SYMBOL
See Also:
Constant Field Values

ALIAS_PROPERTY_KEY

public static final java.lang.String ALIAS_PROPERTY_KEY

LEGEND_MSG

public static final java.lang.String LEGEND_MSG

ALIAS_HELP

public static final java.lang.String ALIAS_HELP
Constructor Detail

TraceFormatter

public TraceFormatter()
Method Detail

format

public java.lang.String format(java.util.logging.LogRecord record)
Overrides:
format in class java.util.logging.SimpleFormatter

formatTime

public static java.lang.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 © 2009 OW2 Consortium. All Rights Reserved.