def wrapper(*args, **kwargs):
kwarg_strs = ['{}={}'.format(k, v) for (k, v) in kwargs]
arg_str = ', '.join([str(a) for a in args] + kwarg_strs)
- call_str = '{}({})'.format(function.func_name, arg_str)
+ call_str = '{}({})'.format(function.__name__, arg_str)
# Perform the call itself, logging before, after, and anything thrown.
try:
for name, member in inspect.getmembers(obj):
if inspect.ismethod(member):
# Skip meta-functions, decorate everything else
- if not member.func_name.startswith('__'):
+ if not member.__name__.startswith('__'):
setattr(obj, name, trace_function(member, log_calls,
log_results, label))
return obj