[openstack-dev] Uniform name for logger in projects

Sergey Kraynev skraynev at mirantis.com
Wed May 21 10:46:46 UTC 2014


Hello, community.

I hope, that most of your know, that a bug with name "Log debugs should not
have translations" (f.e. [1], [2], [3]) was recently raised in several
projects. The reason for this work is related with the following concerns
[4].
There is a special check that is used (or will be used in some projects,
where the related patches have not merged yet) for verification process
(f.e. [5] or [6]). As you can see, this ([5]) verification uses the LOG
name of logger in regexp and "if" cases.
However, there are a lot of projects where both names "LOG" and "logger"
are used [7].
So I have a question about the current situation:
- Should we use one uniform name for logger or add support for both names
in checks?

In my opinion, declaration of one uniform name in hacking rules is
preferable, because it cleans code from useless duplicate names of one
variable and allows to create one uniform check for this rule.

[1] https://bugs.launchpad.net/neutron/+bug/1320867
[2] https://bugs.launchpad.net/swift/+bug/1318333
[3] https://bugs.launchpad.net/oslo/+bug/1317950
[4] https://wiki.openstack.org/wiki/LoggingStandards#Log_Translation
[5]
https://github.com/openstack/nova/blob/master/nova/hacking/checks.py#L201
[6] https://review.openstack.org/#/c/94255/11/heat/hacking/checks.py
[7] https://github.com/openstack/heat/search?q=getLogger&type=Code

Regards,
Sergey.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140521/555d05df/attachment.html>


More information about the OpenStack-dev mailing list