public class Debug
extends java.lang.Object
It is possible to set another output writer, in order to redirect the errors whenever the programmer wants.
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
Debug()
Creates a new instance of Debug
|
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
public final 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.