All applications use some kind of debugging.
Parameters: | globs – dictionary of module globals |
---|
This function, posing as an instance creator, returns a ...
This function decorates a function with instances of buggers that are named by the function name combined with the module name. It is used like this:
@function_debugging
def some_function(arg):
if _debug: some_function._debug("some_function %r", arg)
# rest of code
This results in a bugger called module.some_function that can be accessed by that name when attaching log handlers.
Note
This should really be called debug_function or something like that.
This is a long line of text.
This is a long line of text.
Parameters: |
|
---|
This is a long line of text.
This is a long line of text.
This is a long line of text.
Parameters: | record (logging.LogRecord) – record to format |
---|
This function converts the record into a string. It uses the regular formatting function that it overrides, then if any of the parameters inherit from DebugContents (or duck typed by providing a debug_contents function) the message is extended with the deconstruction of those parameters.
This is a long line of text.
Note
Now that Python supports class decorators, this should really be a class decorator called debug_class or something like that.