SalesPoint v3.3 API

util
Class Debug

java.lang.Object
  extended by util.Debug

public class Debug
extends Object

Debug management class.

You can use calls to Debug.print for any debug message you want to print in your program.

Since:
v1.0
Author:
Steffen Zschaler

Constructor Summary
Debug()
           
 
Method Summary
static void print(String s, int nLevel)
          Print a message to STDERR.
static int setMaxDebugLevel(int nLevel)
          Set the maximum debug level.
static void traceSystemMessages()
          Switch on printing of framework internal debug messages.
static void traceSystemMessages(boolean fSwitch)
          Switch printing of framework internal debug messages.
static void untraceSystemMessages()
          Switch off printing of framework internal debug messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Debug

public Debug()
Method Detail

setMaxDebugLevel

public static int setMaxDebugLevel(int nLevel)
Set the maximum debug level.

When printing messages with print(java.lang.String, int), only messages with a debug level less or equal the maximum debug level will be printed.

Parameters:
nLevel - the maximum debug level. Defaults to 10.
Returns:
the former maximum debug level.

traceSystemMessages

public static void traceSystemMessages()
Switch on printing of framework internal debug messages.


untraceSystemMessages

public static void untraceSystemMessages()
Switch off printing of framework internal debug messages.


traceSystemMessages

public static void traceSystemMessages(boolean fSwitch)
Switch printing of framework internal debug messages.

Parameters:
fSwitch - if true, framework internal debug messages will henceforward be printed.

print

public static void print(String s,
                         int nLevel)
Print a message to STDERR.

Prints s to System.err, if nLevel is less or equal the maximum debug level.

Parameters:
s - the debug message.
nLevel - the message's debug level. Must be greater or equal zero.

SalesPoint v3.3 API