com.ibm.commons.util
Class TDiag

java.lang.Object
  extended by com.ibm.commons.util.TDiag

public class TDiag
extends java.lang.Object

Diagnotics helpers.

Easy to use log utilities.


Constructor Summary
TDiag()
           
 
Method Summary
static void console(java.lang.Exception ex)
          Method that trace an exception to the console.
static void console(java.lang.Exception ex, java.lang.String msg, java.lang.Object... params)
          Method that trace an exception to the console.
static void console(java.lang.String msg, java.lang.Object... params)
          Method that trace to the console.
static void decIndent()
           
static void exception(java.lang.Throwable t)
          Trace an exception to the common logger.
static void exception(java.lang.Throwable t, java.lang.String msg, java.lang.Object... parameters)
           
static java.io.PrintStream getOutputStream()
           
static java.io.PrintStream getSyncObject()
          Common synchronization object when tracing to the output stream
static void incIndent()
           
static void isEnabled()
          Check if the common logger is enabled.
static void trace(java.lang.String msg, java.lang.Object... parameters)
          Trace to the common logger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TDiag

public TDiag()
Method Detail

console

public static final void console(java.lang.String msg,
                                 java.lang.Object... params)
Method that trace to the console. This should be avoided unless the messages must actually go to the console

Parameters:
msg - the message to display
params - the parameters used to format the message

console

public static final void console(java.lang.Exception ex)
Method that trace an exception to the console. This should be avoided unless the messages must actually go to the console

Parameters:
ex - the exception to trace

console

public static final void console(java.lang.Exception ex,
                                 java.lang.String msg,
                                 java.lang.Object... params)
Method that trace an exception to the console. This should be avoided unless the messages must actually go to the console

Parameters:
ex - the exception to trace
msg - the message to display
params - the parameters used to format the message

getSyncObject

public static java.io.PrintStream getSyncObject()
Common synchronization object when tracing to the output stream


isEnabled

public static final void isEnabled()
Check if the common logger is enabled.


trace

public static final void trace(java.lang.String msg,
                               java.lang.Object... parameters)
Trace to the common logger.


incIndent

public static final void incIndent()

decIndent

public static final void decIndent()

exception

public static final void exception(java.lang.Throwable t)
Trace an exception to the common logger.


exception

public static final void exception(java.lang.Throwable t,
                                   java.lang.String msg,
                                   java.lang.Object... parameters)

getOutputStream

public static java.io.PrintStream getOutputStream()