|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.voytechs.util.DebugEnvironment
public class DebugEnvironment
The class controls the debug environment of jNetStream application. By calling turnOnDebug() you enable debug logging from various logging components of the application. In addition the static isDebug() method returns true. Most modules check if isDebug() == true and if it does, then that is the time that they log their debug output.
You can use the getDebugList().add() method and class names for which you would like debug messages to be displayed. Only those logging subsystems with the class name or more specifically the ones that end with the name specified have their logging turn on.
Empty list turns on global debug option in the logging system and all messages are logged. This may be overwhelming and is generally used to lookup which debug messages the user is interested in and after that the output is restricted.
In addition, the debug environment can be further customized using standard Apache CommonsLogging and Log4j configuration options or what ever the logging system utilized by the user. All debug messages are logged using a CommonsLogging library which is logging system independent and can be overriden by the user.
| Constructor Summary | |
|---|---|
DebugEnvironment()
|
|
| Method Summary | |
|---|---|
static void |
debug(Log logger,
java.lang.String string)
Splits the supplied string into individual lines and logs each line seperately with the supplied logger. |
static java.util.List |
getDebugList()
List of class names, or more specifically that name in the supplied string. |
static boolean |
isDebugEnabled()
Check this flag if debug was requested to be turned on, if false, its not worth logging any debug messages. |
static void |
setDebugEnabled(boolean debug)
Manually sets the debug flag. |
static void |
turnOnDebug(java.lang.String prefix)
Turns on all debugging and enables specific requested loggers for debuging based on the debug list, using getDebugList().add() method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DebugEnvironment()
| Method Detail |
|---|
public static java.util.List getDebugList()
public static boolean isDebugEnabled()
public static void setDebugEnabled(boolean debug)
debug - The debug to set.
public static void debug(Log logger,
java.lang.String string)
logger - logger to use for logging each line of the string.string - multiline string to be split up and logged individually.public static void turnOnDebug(java.lang.String prefix)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||