|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.panayotis.iodebug.Debug
public class Debug
This object is responsible to display debug and/or general information on any given Writer (by default to System.err).
It is possible to set another output writer, in order to redirect the errors whereever the programmer wants.
| Field Summary | |
|---|---|
static int |
CRITICAL
Only critical information is presented |
static int |
ERROR
Only errors and critical information is presented |
static int |
INFO
All messages except verbose messages are presented |
static int |
QUIET
Absolutely no debug information is presented |
static int |
VERBOSE
All messages are presented |
static int |
WARNING
Warnings, as well as errors and critical information is presented |
| Constructor Summary | |
|---|---|
Debug()
Creates a new instance of Debug |
|
| Method Summary | |
|---|---|
void |
msg(java.lang.String message,
int level)
Present a message on the Debug stream |
void |
setLevel(int level)
Set the level of verbosity. |
void |
setWriter(java.io.Writer out)
Set the output writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int QUIET
public static final int CRITICAL
public static final int ERROR
public static final int WARNING
public static final int INFO
public static final int VERBOSE
| Constructor Detail |
|---|
public Debug()
| Method Detail |
|---|
public void setLevel(int level)
level - Only messages at least as critical as this level are presented.
public void msg(java.lang.String message,
int level)
message - Message to display. Automatically adds a newline at the end of the string.level - Level of verbosity. If this level is les critical than the desired level,
the message is not displayed.public void setWriter(java.io.Writer out)
out - The Debug stream writer.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||