diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-08-28 14:56:03 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-08-28 15:32:38 +0100 |
commit | bddc1d9fff2ab749b5946f44d52ed0670c1ce801 (patch) | |
tree | 8dcceebfea0a5f83a53c42bf23fc91705905522f /synapse/util/logutils.py | |
parent | When opening this page, do not join a room already joined (diff) | |
download | synapse-bddc1d9fff2ab749b5946f44d52ed0670c1ce801.tar.xz |
use @wraps to set the __name__ __module__ and __doc__ correctly for logged functions
Diffstat (limited to 'synapse/util/logutils.py')
-rw-r--r-- | synapse/util/logutils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/util/logutils.py b/synapse/util/logutils.py index 9270a1790b..021649071b 100644 --- a/synapse/util/logutils.py +++ b/synapse/util/logutils.py @@ -15,6 +15,7 @@ from inspect import getcallargs +from functools import wraps import logging @@ -26,6 +27,7 @@ def log_function(f): lineno = f.func_code.co_firstlineno pathname = f.func_code.co_filename + @wraps(f) def wrapped(*args, **kwargs): name = f.__module__ logger = logging.getLogger(name) |