Module gnue.common.apps.GDebug
Support for debugging messages with independent debug levels and
redirection of messages to a file.
| Function Summary |
| |
gDebug(level,
message,
*args)
Write a message to the debug-output. |
| |
gEnter(level)
Write information about the current function and its parameters to
debug-output. |
| |
gLeave(level,
*result)
Write information about the current function and its return value to
debug-output. |
| |
printMesg(level,
message)
This function is deprecated - use gDebug instead |
| |
setDebug(level,
file)
Initialize and configure the debug message system |
gDebug(level,
message,
*args)
Write a message to the debug-output. This function is available in
the global namespace.
-
- Parameters:
level -
the debug-level the message will be logged in
message -
the message to be logged
- Returns:
-
Always true so it can be filtered out via assert
|
gEnter(level=1)
Write information about the current function and its parameters to
debug-output. This function is available in the global namespace.
assert gEnter is intended to be called at the begin of a
function.
-
- Parameters:
level -
the debug-level the message will be logged in
- Returns:
-
Always true so it can be filtered out via assert
|
gLeave(level=1,
*result)
Write information about the current function and its return value to
debug-output. This function is available in the global namespace.
gLeave is intended to be called at the end of a function.
-
- Parameters:
level -
debug-level to send the message to
result -
the function's result (if any)
- Returns:
-
True
|
printMesg(level,
message)
This function is deprecated - use gDebug instead
-
|
setDebug(level,
file=None)
Initialize and configure the debug message system
-
- Parameters:
level -
A string with the debug levels to output, e.g.
"0-3,5,7"
file -
Filename to output debug messages to (instead of stderr)
|