]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Use lazy logging interpolation
authorAngus Lees <gus@inodes.org>
Mon, 22 Dec 2014 04:35:32 +0000 (15:35 +1100)
committerAngus Lees <gus@inodes.org>
Mon, 22 Dec 2014 06:12:54 +0000 (17:12 +1100)
commit7a006a83e9023740122b575a9518541ff57c1cb5
treec70f722dd57f1395f8ff965eac45f9065ff2e8ec
parentfffc6e4712328574a8fe42d7b7520c0dace2b6b7
Use lazy logging interpolation

There are a small number of examples of "eager" interpolation in
neutron:
  logging.debug("foo %s" % arg)

These should be converted to perform the interpolation lazily within
the logging function, since if the severity is below the logging level
then the interpolation can be skipped entirely.

This change addresses all such current examples found in neutron core
via a pylint test.  Vendor plugins and services are fixed elsewhere.

Change-Id: I823d8453cd76e4985cabd31ca6b939f43a80b36c
Partial-Bug: #1404788
neutron/agent/dhcp_agent.py
neutron/agent/linux/dhcp.py
neutron/agent/linux/utils.py
neutron/api/rpc/handlers/l3_rpc.py
neutron/common/config.py
neutron/common/rpc.py
neutron/db/agents_db.py
neutron/debug/commands.py
neutron/tests/unit/test_l3_plugin.py