[openstack-dev] [heat] [neutron] [trove] [swift] Uniform name for logger in projects

Jason Dunsmore jason.dunsmore at rackspace.com
Thu May 22 14:42:12 UTC 2014


(Adding relevant projects to subject.  Hope I didn't miss any.)

Heat, Neutron, Trove, and Swift devs,

Do we want to change all instances of "logger" variable names to "LOG"
(like most OpenStack projects use) and enforce that via the hacking
rules?

Regards,
Jason


On Wed, May 21 2014, Sergey Kraynev wrote:

> 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.
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list