net.sf.xbus.base.core.trace
Class Formatter

java.lang.Object
  extended by net.sf.xbus.base.core.trace.Formatter

public class Formatter
extends java.lang.Object

The Formatter ensures, that every line in the trace-protocol has an equal format.


Constructor Summary
Formatter()
           
 
Method Summary
static java.lang.String format(java.lang.String message, int priority)
          Formats a trace-line: Timestamp | Priority | Threadname | Message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Formatter

public Formatter()
Method Detail

format

public static java.lang.String format(java.lang.String message,
                                      int priority)
                               throws XException
Formats a trace-line:

Timestamp | Priority | Threadname | Message

Parameters:
message - the message to be traced
priority - the priority after which the messages should be traced
Returns:
String - formatted trace-line
Throws:
XException - if any error occurs