ff252894b377bcfd9e80ede3eb3c4debc7c87444
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
oslo.log
OpenStack logging configuration library
- Free software: Apache license
- Documentation: http://docs.openstack.org/developer/oslo.log
- Source: http://git.openstack.org/cgit/openstack/oslo.log
- Bugs: http://bugs.launchpad.net/oslo
Description
Languages
Python
100%