##// END OF EJS Templates
rcextensions: added logging for basic function calls
marcink -
r3921:36433cb7 default
parent child Browse files
Show More
@@ -15,8 +15,9 b''
15 # This program is dual-licensed. If you wish to learn more about the
15 # This program is dual-licensed. If you wish to learn more about the
16 # RhodeCode Enterprise Edition, including its added features, Support services,
16 # RhodeCode Enterprise Edition, including its added features, Support services,
17 # and proprietary license terms, please see https://rhodecode.com/licenses/
17 # and proprietary license terms, please see https://rhodecode.com/licenses/
18
18 import logging
19 from .utils import DotDict, HookResponse, has_kwargs
19 from .utils import DotDict, HookResponse, has_kwargs
20 log = logging.getLogger('rhodecode.' + __name__)
20
21
21
22
22 # Config shortcut to keep, all configuration in one place
23 # Config shortcut to keep, all configuration in one place
@@ -16,10 +16,13 b''
16 # RhodeCode Enterprise Edition, including its added features, Support services,
16 # RhodeCode Enterprise Edition, including its added features, Support services,
17 # and proprietary license terms, please see https://rhodecode.com/licenses/
17 # and proprietary license terms, please see https://rhodecode.com/licenses/
18
18
19 import logging
19 import os
20 import os
20 import functools
21 import functools
21 import collections
22 import collections
22
23
24 log = logging.getLogger('rhodecode.' + __name__)
25
23
26
24 class HookResponse(object):
27 class HookResponse(object):
25 def __init__(self, status, output):
28 def __init__(self, status, output):
@@ -135,6 +138,7 b' def has_kwargs(required_args):'
135 _verify_kwargs(func.func_name, required_args.keys(), kwargs)
138 _verify_kwargs(func.func_name, required_args.keys(), kwargs)
136 # in case there's `calls` defined on module we store the data
139 # in case there's `calls` defined on module we store the data
137 maybe_log_call(func.func_name, args, kwargs)
140 maybe_log_call(func.func_name, args, kwargs)
141 log.debug('Calling rcextensions function %s', func.func_name)
138 return func(*args, **kwargs)
142 return func(*args, **kwargs)
139 return wrapper
143 return wrapper
140 return wrap
144 return wrap
General Comments 0
You need to be logged in to leave comments. Login now