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

java.lang.Object
  extended by net.sf.xbus.base.core.trace.ConsoleTrace
All Implemented Interfaces:
TraceTarget

public class ConsoleTrace
extends java.lang.Object
implements TraceTarget

This implementation of TraceTarget writes the trace to the console (stdout).


Constructor Summary
ConsoleTrace()
           
 
Method Summary
 java.lang.String getTrace()
          Not implemented for ConsoleTrace!
 void trace(int priority, java.lang.Object message, java.lang.Throwable t)
          Writes the message, the priority and if given the backtrace of the Throwable to the console.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleTrace

public ConsoleTrace()
Method Detail

trace

public void trace(int priority,
                  java.lang.Object message,
                  java.lang.Throwable t)
Writes the message, the priority and if given the backtrace of the Throwable to the console.

It uses the class Formatter.

Specified by:
trace in interface TraceTarget
Parameters:
priority - the priority after which the messages should be traced
message - the message to be traced
t - the stack trace of the Throwable

getTrace

public java.lang.String getTrace()
Not implemented for ConsoleTrace!

Returns all trace messages as one large string.

Specified by:
getTrace in interface TraceTarget
Returns:
String - "ConsoleTrace can't return trace messages."
Throws:
XException - if any error occurs