Go to file
Ihar Hrachyshka ff252894b3 Added helper decorator to log method arguments
The decorator originates from Neutron [1]. It's used there to log
arguments for oslo.messaging cast()/call() methods useful when debugging
interactions between different services.

The original version of the decorator was extended to work correctly for
class methods. Static methods are out of scope for this particular
decorator.

The original name of the decorator was also changed (log ->
log_method_call) to reflect the fact that it's designed for methods
only, not to be used as a general logger helper for any callable. If one
is needed, we need to introduce another generic decorator for all
callables that won't distinguish between first argument and the rest.

The plan is to merge the decorator into oslo.log and then adopt it in
oslo.messaging itself to make logging facility not specific to Neutron.

Added a simplistic unit test to check that decorator works as expected
for both object and class methods.

[1]: http://git.openstack.org/cgit/openstack/neutron/tree/neutron/common/log.py

Change-Id: I8436c954076fdc42482dec8e88f3075f055d425e
2014-12-04 13:21:29 +01:00
2014-08-25 21:24:50 -04:00
2014-09-02 08:52:42 -04:00
2014-09-04 16:33:32 -04:00
2014-09-24 09:02:12 +00:00
2014-10-31 20:06:14 +00:00

oslo.log

OpenStack logging configuration library

Description
Logging library.
Readme 7.7 MiB
Languages
Python 100%