|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.nlp.util.Dbg
This class now combines two sets of debugging calls: Chris': Centralize the debugging print-outs, and make them more efficient when turned off at runtime. Always use if (Dbg.WHATEVER) Dbg.print(str); Then string isn't constructed if debugging is turned off
Sep's: Debugging class. Variables and Methods involved in debugging code.
The variable verbosity
gives a level of "loudness". The
higher the value of verbosity
, the more debugging statements
will be printed.
verbosity
0 -- silent
1 -- prints necessary output, but no debugging statements
10 -- very loud . . . prints all debugging values
Field Summary | |
static boolean |
ERROR
|
static boolean |
FIVE
|
static boolean |
FOUR
|
static boolean |
ONE
|
static boolean |
PARSE
|
static boolean |
PROGRESS
|
static boolean |
SIX
|
static boolean |
THREE
|
static boolean |
TIMING
|
static boolean |
TWO
|
static boolean |
VERBOSE
|
static int |
verbosity
|
static boolean |
WARNING
|
Constructor Summary | |
Dbg()
|
Method Summary | |
static void |
close()
|
static void |
linePrint(int line,
String s)
|
static void |
print(String s)
Print the debug message to a file or stderr |
static void |
println(int v,
String s)
prints string s only if the verbosity exceeds v |
static void |
printToFile(String filename,
String message)
Prints to a file. |
static void |
printToFile(String filename,
String message,
boolean append)
Prints to a file. |
static void |
setVerbosity(int v)
Sets the verbosity to v. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final boolean ERROR
public static final boolean WARNING
public static final boolean TIMING
public static final boolean VERBOSE
public static final boolean PARSE
public static final boolean PROGRESS
public static final boolean ONE
public static final boolean TWO
public static final boolean THREE
public static final boolean FOUR
public static final boolean FIVE
public static final boolean SIX
public static int verbosity
Constructor Detail |
public Dbg()
Method Detail |
public static void print(String s)
s
- The string to printpublic static void linePrint(int line, String s)
public static void close()
public static void setVerbosity(int v)
public static void println(int v, String s)
public static void printToFile(String filename, String message, boolean append)
append=true
, and overwrites if append=false
public static void printToFile(String filename, String message)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |