Debugpublic class Debug extends Object
Methods Summary |
---|
public static boolean | isEnabled(java.lang.String category)Static method to see if a given category of debugging is enabled.
Enable by setting e.g., -Ddebug.fileio to debug file I/O operations.
For example:
if (Debug.isEnabled("fileio"))
System.out.println("Starting to read file " + fileName);
return System.getProperty("debug." + category) != null;
| public static void | println(java.lang.String category, java.lang.String msg)Static method to println a given message if the
given category is enabled for debugging, as reported by isEnabled.
if (isEnabled(category))
System.out.println(msg);
| public static void | println(java.lang.String category, java.lang.Object stuff)Static method to println an arbitrary Objecct if the given
category is enabled for debugging, as reported by isEnabled.
println(category, stuff.toString());
|
|