Log function name for time log

This commit is contained in:
tomkat83 2016-12-04 14:05:12 +01:00
parent aca7c3ee4e
commit 9d60b9bbbe

View file

@ -856,7 +856,8 @@ def LogTime(func):
starttotal = datetime.now()
result = func(*args, **kwargs)
elapsedtotal = datetime.now() - starttotal
log.debug('It took %s to run the function.' % (elapsedtotal))
log.debug('It took %s to run the function %s'
% (elapsedtotal, func.__name__))
return result
return wrapper