core
Class Debug

java.lang.Object
  extended by core.Debug

public class Debug
extends java.lang.Object

Debugging info printer with time stamping. This class is not to be actively used but convenient for temporary debugging.


Constructor Summary
Debug()
           
 
Method Summary
static void doneTiming()
          End timing an action.
static void p(java.lang.String txt)
          Prints text to output with level 0
static void p(java.lang.String txt, int level)
          Prints text to output given with level
static void p(java.lang.String txt, int level, boolean timestamp)
          Print text to debug output.
static void pt(java.lang.String txt)
          Debug print with a timestamp and 0 level
static void pt(java.lang.String txt, int level)
          Debug print with a timestamp
 void setDebugLevel(int level)
          Sets the current debug level (smaller level -> more messages)
 void setPrintStream(java.io.PrintStream outStrm)
          Sets print stream of debug output.
static void startTiming(java.lang.String cause)
          Start timing an action.
 
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

setDebugLevel

public void setDebugLevel(int level)
Sets the current debug level (smaller level -> more messages)

Parameters:
level - The level to set

setPrintStream

public void setPrintStream(java.io.PrintStream outStrm)
Sets print stream of debug output.

Parameters:
outStrm - The stream

p

public static void p(java.lang.String txt)
Prints text to output with level 0

Parameters:
txt - text to print

p

public static void p(java.lang.String txt,
                     int level)
Prints text to output given with level

Parameters:
level - The debug level
txt - text to print

pt

public static void pt(java.lang.String txt,
                      int level)
Debug print with a timestamp

Parameters:
txt - Text to print
level - Debug level

pt

public static void pt(java.lang.String txt)
Debug print with a timestamp and 0 level

Parameters:
txt - Text to print

p

public static void p(java.lang.String txt,
                     int level,
                     boolean timestamp)
Print text to debug output.

Parameters:
txt - The text to print
level - The debug level (only messages with level >= debugLevel are printed)
timestamp - If true, text is (sim)timestamped

startTiming

public static void startTiming(java.lang.String cause)
Start timing an action.

See Also:
doneTiming()

doneTiming

public static void doneTiming()
End timing an action. Information how long the action took is printed to debug stream.

See Also:
startTiming(String)