|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.sas.edir.Debug
The Debug class provides a uniform debugging interface that is easily controllable from a properties file. It takes a Properties object and looks for properties that start with "Servlet.Debug" and the remainder of the key is a debugging class to turn on. Debug output can then be easily controlled by using specific classes in the Java code, and turning those classes on and off from the properties.
| Constructor Summary | |
Debug()
|
|
| Method Summary | |
static void |
addClass(java.lang.String debugClass)
Add a class to enable for debugging. |
static void |
debug(java.lang.String debugClass,
java.lang.String output)
Output text to the PrintStream. |
static void |
debugFormat(java.lang.String debugClass,
java.lang.Object source,
java.util.Locale locale,
java.lang.String resFile,
java.lang.String msgId,
java.lang.Object[] args)
Output data formatted using a resource file. |
static void |
debugFormat(java.lang.String debugClass,
java.lang.Object source,
java.lang.String resfile,
java.lang.String msgId)
Output data formatted using a resource file. |
static void |
debugStackTrace(java.lang.String debugClass,
java.lang.Object source,
java.util.Locale locale,
java.lang.String resFile,
java.lang.Throwable t)
Output a stack track to the debug stream. |
static java.io.PrintStream |
getDebugStream()
Get the PrintStream in use by the Debug class. |
static java.io.PrintStream |
getDebugStream(java.lang.String debugClass)
Get the PrintStream in use by the Debug class if the specified debugClass is activated. |
static void |
init(java.util.Properties prop)
Initialize the Debug class with a Properties object. |
static boolean |
removeClass(java.lang.String debugClass)
Remove a class from the enabled debug classes. |
static void |
setDebugStream(java.io.PrintStream debugStream)
Set the debugStream to use for output. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Debug()
| Method Detail |
public static void init(java.util.Properties prop)
throws java.lang.NullPointerException
prop - A properties object with the debugging options.public static void addClass(java.lang.String debugClass)
debugClass - The class name to add. By convention, the
class should be "objectclass.subclass", like Entity.caching
to output messages related to caching Entity objects.public static boolean removeClass(java.lang.String debugClass)
debugClass - The class to remove.public static void setDebugStream(java.io.PrintStream debugStream)
debugStream - The new stream to use
public static void debug(java.lang.String debugClass,
java.lang.String output)
debugClass - The class of this output string.output - The data to output.
public static void debugFormat(java.lang.String debugClass,
java.lang.Object source,
java.lang.String resfile,
java.lang.String msgId)
debugClass - The class of the output being generatedsource - The object that's creating the output.resfile - The resource file to use for formatting the outputmsgId - The ID of the message in the resource file to create.
public static void debugFormat(java.lang.String debugClass,
java.lang.Object source,
java.util.Locale locale,
java.lang.String resFile,
java.lang.String msgId,
java.lang.Object[] args)
debugClass - The class of the output.source - The object that's creating the outputlocale - The Locale object representing the current output locale (null for default).resFile - The resource file to use to find the message.msgId - The ID of the message to generate.args - An array of arguments to provide for formatting the output.
public static void debugStackTrace(java.lang.String debugClass,
java.lang.Object source,
java.util.Locale locale,
java.lang.String resFile,
java.lang.Throwable t)
debugClass - The class of the output.source - The object generating the output.locale - The Locale representing the current output locale (null for default).resFile - The resource file to use to generate the output.ex - The exception which generated the stack tracepublic static java.io.PrintStream getDebugStream()
public static java.io.PrintStream getDebugStream(java.lang.String debugClass)
debugClass - The class of the output.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||