Tools for debugging GC3Libs based programs.

Part of the code used in this module originally comes from:

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


>>> format_arg_value(('x', (1, 2, 3)))
'x=(1, 2, 3)'

Determine if a name is a class private name.


Determine if an instancemethod is a classmethod.


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).


Return an item’s name.

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

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>>)

Trace calls to class methods and static functions

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

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>>)

Trace calls to functions and methods in a module.