Class Debug

java.lang.Object
  |
  +--Debug

public class Debug
extends java.lang.Object

Debug control class globally available to an application that wishes to conditionally generate helpful debugging messages.


Constructor Summary
protected Debug()
          Sole constructor.
 
Method Summary
static void msg(int importance, java.lang.Object s)
          Displays a debug message (or more geneally object) of the specified importance.
static int setDebugLevel(int level)
          Change the current debug level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Debug

protected Debug()
Sole constructor.

Method Detail

setDebugLevel

public static int setDebugLevel(int level)
Change the current debug level. Requests to display debug messages with importance at or above the current debug level are displayed.

Parameters:
level - the new level
Returns:
the previous level.

msg

public static void msg(int importance,
                       java.lang.Object s)
Displays a debug message (or more geneally object) of the specified importance.

Parameters:
importance - of this message. If < current level, nothing is displayed.
s - message (or more generally, object) to be displayed.