|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mosaic.sim.neuron.Debug
This class is used for debugging purposes, mainly for printing debug traces dependent on a trace level and for assertions (which will be supported natively in JDK 1.4 as soon as it becomes stable).
Field Summary | |
static boolean |
debug
Debugging methods are enabled in the project only if this is set to true. |
static int |
level
Determines the debugging level, can be one of LEVEL_*. |
static int |
LEVEL_ALL
Log everything that can be logged. |
static int |
LEVEL_CRITICAL
Only log critical debug trace statements, this is minimal debugging. |
static int |
LEVEL_ERROR
Log everything from LEVEL_CRITICAL and error messages. |
static int |
LEVEL_INFO
Log everything from LEVEL_WARNING and info messages. |
static int |
LEVEL_NONE
Log nothing. |
static int |
LEVEL_TRACE
Log everything from LEVEL_INFO and print various traces for examining rhe program paths. |
static int |
LEVEL_WARNING
Log everything from LEVEL_ERROR and warning messages. |
Constructor Summary | |
Debug()
|
Method Summary | |
static void |
assertCond(boolean condition,
java.lang.String location,
java.lang.String message)
Assert that a condition is true. |
static void |
output(int minlevel,
java.lang.String message)
Output some message if the currently set debugging level is equal to or higher than the given minimum debugging level. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final int LEVEL_NONE
public static final int LEVEL_CRITICAL
public static final int LEVEL_ERROR
public static final int LEVEL_WARNING
public static final int LEVEL_INFO
public static final int LEVEL_TRACE
public static final int LEVEL_ALL
public static final boolean debug
public static final int level
Constructor Detail |
public Debug()
Method Detail |
public static void assertCond(boolean condition, java.lang.String location, java.lang.String message)
condition
- The assertion aborts program execution if condition is
false.location
- This string should specify the exact program location
from where the assertion is called.message
- This string is printed out in the debugging trace if the
assertion fails.public static void output(int minlevel, java.lang.String message)
minlevel
- The current debugging level must be equal to or higher
than this value for the message to be printed.message
- The string that should be printed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |