gc3libs.debug

Tools for debugging GC3Libs based programs.

Part of the code used in this module originally comes from:
gc3libs.debug.format_arg_value(arg_val)

Return a string representing a (name, value) pair.

Example:

>>> format_arg_value(('x', (1, 2, 3)))
'x=(1, 2, 3)'
gc3libs.debug.is_class_private_name(name)

Determine if a name is a class private name.

gc3libs.debug.is_classmethod(instancemethod)

Determine if an instancemethod is a classmethod.

gc3libs.debug.method_name(method)

Return a method’s name.

This function returns the name the method is accessed by from outside the class (i.e. it prefixes “private” methods appropriately).

gc3libs.debug.name(item)

Return an item’s name.

gc3libs.debug.trace(fn, log=<bound method Logger.debug of <logging.Logger object at 0x2b0f9d0>>)

Logs calls to a function.

Returns a decorated version of the input function which “echoes” calls made to it by writing out the function’s name and the arguments it was called with.

gc3libs.debug.trace_class(cls, log=<bound method Logger.debug of <logging.Logger object at 0x2b0f9d0>>)

Trace calls to class methods and static functions

gc3libs.debug.trace_instancemethod(cls, method, log=<bound method Logger.debug of <logging.Logger object at 0x2b0f9d0>>)

Change an instancemethod so that calls to it are traced.

Replacing a classmethod is a little more tricky. See: http://www.python.org/doc/current/ref/types.html

gc3libs.debug.trace_module(mod, log=<bound method Logger.debug of <logging.Logger object at 0x2b0f9d0>>)

Trace calls to functions and methods in a module.

Previous topic

gc3libs.core

Next topic

gc3libs.exceptions