public class Debug extends Object
This class defines a set of static methods that can be called to produce debugging messages. Messages have an associated "debug level" and messages below the current setting are not displayed.
Modifier and Type | Field and Description |
---|---|
protected int |
debug
The internal debug level.
|
Constructor and Description |
---|
Debug()
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getDebug() |
void |
message(int level,
String message)
Print debug message (if the debug level is high enough).
|
void |
message(int level,
String message,
String spec)
Print debug message (if the debug level is high enough).
|
void |
message(int level,
String message,
String spec1,
String spec2)
Print debug message (if the debug level is high enough).
|
void |
setDebug(int newDebug)
Set the debug level for future messages.
|
public void setDebug(int newDebug)
newDebug
- public int getDebug()
public void message(int level, String message)
Prints "the message"
level
- The debug level of this message. This message
will only be
displayed if the current debug level is at least equal to this
value.message
- The text of the message.public void message(int level, String message, String spec)
Prints "the message: spec"
level
- The debug level of this message. This message
will only be
displayd if the current debug level is at least equal to this
value.message
- The text of the message.spec
- An argument to the message.public void message(int level, String message, String spec1, String spec2)
Prints "the message: spec1" and "spec2" indented on the next line.
level
- The debug level of this message. This message
will only be
displayed if the current debug level is at least equal to this
value.message
- The text of the message.spec1
- An argument to the message.spec2
- Another argument to the message.Copyright © 2018 JBoss by Red Hat. All rights reserved.