|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ic.doc.automed.util.Debugger
public class Debugger
Field Summary | |
---|---|
static int |
DEBUG_CACHE
Debug section: cache |
static int |
DEBUG_DIRECTORY
Debug section: directory service |
static int |
DEBUG_DIRECTORY_REPOSITORY
|
static int |
DEBUG_DIRECTORY_TIMER
|
static int |
DEBUG_GENERAL
|
static int |
DEBUG_GUI
Debug information from the gui package |
static int |
DEBUG_HELLO
Debug Hello protocol |
static int |
DEBUG_LEVEL_ALL
All debug information |
static int |
DEBUG_LEVEL_DEFAULT
No debug but report run-time errors |
static int |
DEBUG_LEVEL_DETAILED
Detailed debug information |
static int |
DEBUG_LEVEL_ERROR
Error information |
static int |
DEBUG_LEVEL_INFO
Debug information to let user know what is going on |
static int |
DEBUG_LEVEL_NONE
No debug at all |
static int |
DEBUG_LEVEL_PACKET
Packet-level debug information |
static int |
DEBUG_LEVEL_STD
Standard debug information |
static int |
DEBUG_LEVEL_WARN
Warning information |
static int |
DEBUG_P2P
Debug information from the p2p package |
static int |
DEBUG_P2P_MESSAGING
|
static int |
DEBUG_P2P_OVERLAY
|
static int |
DEBUG_PATHWAY
Debug information about pathway manipulations in the reps package |
static int |
DEBUG_QUERY
Debug section: query processing |
static int |
DEBUG_QUERY_REWRITE
|
static int |
DEBUG_REGISTRY
Debug section: registry |
static int |
DEBUG_REPOSITORY
Debug the repository |
static int |
DEBUG_SCHEMA
Debug the exchange of schema information |
static int |
DEBUG_WRAPPER
Debug information from the wrappers package |
static int |
LEVEL_ALL
All debug information |
static int |
LEVEL_ERROR
Error information |
static int |
LEVEL_FINE
Application operations with some details |
static int |
LEVEL_FINER
Application operations with greater details |
static int |
LEVEL_FINEST
Application operations with finest details |
static int |
LEVEL_INFO
Debug information to let user know what is going on |
static int |
LEVEL_OFF
No debug at all |
static int |
LEVEL_WARN
Warning information |
Constructor Summary | |
---|---|
Debugger()
Creates a new instance of Debugger |
Method Summary | |
---|---|
static boolean |
atDebugLevel(int level)
Return true if the debug level set by setDebugLevel(int) is
at least at a certain level. |
static boolean |
atSectionDebugLevel(int section,
int level)
Tests whether the section of code has been set to at least the debug level specified. |
static void |
debugPrintStackTrace(java.lang.Throwable throwable,
int level)
Print an throwable's stack trace, but only at a certain debug level |
static int |
getDebugLevel()
Return the value of the debug level at set by setDebugLevel(int) |
static int |
getSectionDebugLevel(int section)
Gets the debug level which the section of code has been set to. |
static void |
setDebugLevel(int level)
Control the printing of debug information printed on the command line |
static void |
setSectionDebugLevel(int section,
int level)
Set the level of debug info output to the console for a numbered section of code. |
static void |
setSectionDebugLevel(java.lang.String[] cmdArgs)
From command-line arguments, find debug flag and set debug settings accordingly |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEBUG_GENERAL
public static final int DEBUG_GUI
public static final int DEBUG_PATHWAY
public static final int DEBUG_P2P
public static final int DEBUG_P2P_OVERLAY
public static final int DEBUG_P2P_MESSAGING
public static final int DEBUG_WRAPPER
public static final int DEBUG_HELLO
public static final int DEBUG_REPOSITORY
public static final int DEBUG_SCHEMA
public static final int DEBUG_CACHE
public static final int DEBUG_QUERY
public static final int DEBUG_QUERY_REWRITE
public static final int DEBUG_REGISTRY
public static final int DEBUG_DIRECTORY
public static final int DEBUG_DIRECTORY_TIMER
public static final int DEBUG_DIRECTORY_REPOSITORY
public static final int DEBUG_LEVEL_NONE
public static final int DEBUG_LEVEL_DEFAULT
public static final int DEBUG_LEVEL_INFO
public static final int DEBUG_LEVEL_WARN
public static final int DEBUG_LEVEL_STD
public static final int DEBUG_LEVEL_ERROR
public static final int DEBUG_LEVEL_DETAILED
public static final int DEBUG_LEVEL_PACKET
public static final int DEBUG_LEVEL_ALL
public static final int LEVEL_OFF
public static final int LEVEL_INFO
public static final int LEVEL_WARN
public static final int LEVEL_ERROR
public static final int LEVEL_FINE
public static final int LEVEL_FINER
public static final int LEVEL_FINEST
public static final int LEVEL_ALL
Constructor Detail |
---|
public Debugger()
Method Detail |
---|
public static void setDebugLevel(int level)
level
- value to set the debug level at, according to the following
scale:
-1: no debug information, and no reporting of errors the system
finds in its execution if the system can ignore them
0: no debug information (default), but report on errors that the
system has ignored during its execution
1: only debug information that is to explain to users what is going on
5: standard information for software development work on repository
8: detailed information for software development work on repository
10: all debug informationpublic static int getDebugLevel()
setDebugLevel(int)
public static boolean atDebugLevel(int level)
setDebugLevel(int)
is
at least at a certain level. For example, this is used in code of the
form if (atDebugLevel(5)) ...
to ensure that something is
only executed when the system has been set at debug level 5 or more
level
- threshold value of debug level for which being "at a debug
level" is truepublic static void setSectionDebugLevel(int section, int level)
section
- The section of code to set the level for. Setting
the debug level for section 0 sets the global debug levellevel
- The debug level for the section of codepublic static void setSectionDebugLevel(java.lang.String[] cmdArgs) throws AutoMedException
cmdArgs
- the array of command line arguments
AutoMedException
public static int getSectionDebugLevel(int section)
section
- The section of code for which the debug level is wanted.
Getting section 0 returns the global debug level
public static boolean atSectionDebugLevel(int section, int level)
section
- The section of code to check the debug level forlevel
- The debug level for which is returned true if the
section has been set to a least this value
public static final void debugPrintStackTrace(java.lang.Throwable throwable, int level)
throwable
- that is to be reported ondebugLevel
- that STR must be at in order for throwable to be
reported on
deprecated Moved to Debugger classes
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |