Package rasj.global
Class Debug
java.lang.Object
rasj.global.Debug
Methods of this static class perform debugging output into
the servlet log (usually /opt/jakarta/logs/servlet.log).
For entering a method to be traced, logging indent level is
increased; the logging methods for leaving a method decrease
indent, and the trace methods inbetween leave indentation unchanged.
[Needless to say that both statically and dynamically the number
of enters and leaves should match.]
Four trace levels are provided, intended for reporting increasingly verbose (i.e., for decreasingly dangerous events):
- critical (always logged),
- warning (default level),
- sparse,
- verbose.
Initialisation requires passing the servlet object to gain an output stream to write to.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intlog only critical eventsstatic final intdebug threshold defaultstatic final intlog also occasional output interesting for debuggingstatic final intlog all information available to aid debuggingstatic final intlog also warnings which do not really impede processing -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidenterCritical(String what) method enter msg, output only with critical levelstatic voidenterSparse(String what) method enter msg, output only with sparse levelstatic voidenterVerbose(String what) method enter msg, output only with verbose log levelstatic voidenterWarning(String what) method enter msg, output only with warning levelstatic voidleaveCritical(String what) method leave msg, output only with critical levelstatic voidleaveSparse(String what) method leave msg, output only with sparse levelstatic voidleaveVerbose(String what) method leave msg, output only with verbose log levelstatic voidleaveWarning(String what) method leave msg, output only with warning levelstatic voidsetDebugThreshold(int level) set debug threshold to control further outputstatic voidtalkCritical(String what) method inside msg, output only with critical levelstatic voidtalkSparse(String what) method inside msg, output only with sparse levelstatic voidtalkVerbose(String what) method inside msg, output only with verbose log levelstatic voidtalkWarning(String what) method inside msg, output only with warning level
-
Field Details
-
CRITICAL_LEVEL
public static final int CRITICAL_LEVELlog only critical events- See Also:
-
WARNING_LEVEL
public static final int WARNING_LEVELlog also warnings which do not really impede processing- See Also:
-
SPARSE_LEVEL
public static final int SPARSE_LEVELlog also occasional output interesting for debugging- See Also:
-
VERBOSE_LEVEL
public static final int VERBOSE_LEVELlog all information available to aid debugging- See Also:
-
DEFAULT_LEVEL
public static final int DEFAULT_LEVELdebug threshold default- See Also:
-
-
Constructor Details
-
Debug
public Debug()
-
-
Method Details
-
setDebugThreshold
public static void setDebugThreshold(int level) set debug threshold to control further output -
enterCritical
method enter msg, output only with critical level -
enterWarning
method enter msg, output only with warning level -
enterSparse
method enter msg, output only with sparse level -
enterVerbose
method enter msg, output only with verbose log level -
leaveCritical
method leave msg, output only with critical level -
leaveWarning
method leave msg, output only with warning level -
leaveSparse
method leave msg, output only with sparse level -
leaveVerbose
method leave msg, output only with verbose log level -
talkCritical
method inside msg, output only with critical level -
talkWarning
method inside msg, output only with warning level -
talkSparse
method inside msg, output only with sparse level -
talkVerbose
method inside msg, output only with verbose log level
-