logging messages should use function parameters instead of string format arguments

Bug #1321274 reported by Christian Berendt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Undecided
ting.wang
oslo-incubator
Fix Released
Low
Christian Berendt
oslo.messaging
Fix Released
Low
Christian Berendt

Bug Description

Specify string format arguments as logging function parameters Used when a logging statement has a call form of “logging.<logging method>(format_string % (format_args...))”. Such calls should leave string interpolation to the logging method itself and be written “logging.<logging method>(format_string, format_args...)” so that the program may avoid incurring the cost of the interpolation in those cases in which no message will be logged. For more, see http://www.python.org/dev/peps/pep-0282/.

Source: http://docs.pylint.org/features.html

Changed in oslo:
assignee: nobody → Christian Berendt (berendt)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.vmware (master)

Fix proposed to branch: master
Review: https://review.openstack.org/94383

Ben Nemec (bnemec)
Changed in oslo:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.vmware (master)

Reviewed: https://review.openstack.org/94383
Committed: https://git.openstack.org/cgit/openstack/oslo.vmware/commit/?id=caababc62dfc7d84d5c6e2df81e11e89bfb9c282
Submitter: Jenkins
Branch: master

commit caababc62dfc7d84d5c6e2df81e11e89bfb9c282
Author: Christian Berendt <email address hidden>
Date: Tue May 20 16:46:01 2014 +0200

    replace string format arguments with function parameters

    There are files containing string format arguments inside
    logging messages. Using logging function parameters should
    be preferred.

    Change-Id: I456f411ad6ca46a8c8de442c74c18276faca920e
    Partial-Bug: #1321274

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.db (master)

Reviewed: https://review.openstack.org/94334
Committed: https://git.openstack.org/cgit/openstack/oslo.db/commit/?id=d09fff66407a8f24ef724cafb69b04311ec11f7d
Submitter: Jenkins
Branch: master

commit d09fff66407a8f24ef724cafb69b04311ec11f7d
Author: Christian Berendt <email address hidden>
Date: Tue May 20 11:58:58 2014 +0200

    replace string format arguments with function parameters

    There are files containing string format arguments inside
    logging messages. Using logging function parameters should
    be preferred.

    Change-Id: I089a4c51c0fe98906d74bcdbd5394e74631d0dba
    Partial-Bug: #1321274

Mark McLoughlin (markmc)
Changed in oslo.messaging:
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Christian Berendt (berendt)
Changed in oslo.messaging:
assignee: Christian Berendt (berendt) → Mark McLoughlin (markmc)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.messaging (master)

Reviewed: https://review.openstack.org/94355
Committed: https://git.openstack.org/cgit/openstack/oslo.messaging/commit/?id=409108c74f79dba7167c6a5f0ff79fe0553fbe32
Submitter: Jenkins
Branch: master

commit 409108c74f79dba7167c6a5f0ff79fe0553fbe32
Author: Christian Berendt <email address hidden>
Date: Tue May 20 14:50:23 2014 +0200

    replace string format arguments with function parameters

    There are files containing string format arguments inside
    logging messages. Using logging function parameters should
    be preferred.

    Change-Id: I4a7ce6916aefb2f2d445f0ebd977c824b1c51e24
    Partial-Bug: #1321274

Mark McLoughlin (markmc)
Changed in oslo.messaging:
status: In Progress → Fix Committed
assignee: Mark McLoughlin (markmc) → Christian Berendt (berendt)
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

This appears to be done, but please reopen the ticket if it isn't.

Changed in oslo:
status: In Progress → Fix Committed
tags: added: db messaging vmware
Revision history for this message
Viktor Serhieiev (vsergeyev) wrote :

This should be marked as "fix released" in oslo.db

Changed in oslo:
milestone: none → juno-2
status: Fix Committed → Fix Released
Changed in oslo.messaging:
milestone: none → juno-2
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.messaging (master)

Fix proposed to branch: master
Review: https://review.openstack.org/271270

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.messaging (master)

Reviewed: https://review.openstack.org/271270
Committed: https://git.openstack.org/cgit/openstack/oslo.messaging/commit/?id=6e2f4efb1949db0ed32774f8b8de08f1f4aaeae1
Submitter: Jenkins
Branch: master

commit 6e2f4efb1949db0ed32774f8b8de08f1f4aaeae1
Author: Javeme <email address hidden>
Date: Fri Jan 22 20:36:43 2016 +0800

    replace string format arguments with function parameters

    There are files containing string format arguments inside
    logging messages. Using logging function parameters should
    be preferred.

    Change-Id: Iaa15bc52d1d8832032cc46205effb49630cea494
    Closes-Bug: #1321274

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/oslo.messaging 4.1.0

This issue was fixed in the openstack/oslo.messaging 4.1.0 release.

ting.wang (bx-wang)
Changed in manila:
assignee: nobody → tingwang (bx-wang)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.openstack.org/278425

Changed in manila:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/278425
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=09dfc861c816c1c778897bfb37e1ee5bd616a523
Submitter: Jenkins
Branch: master

commit 09dfc861c816c1c778897bfb37e1ee5bd616a523
Author: ting.wang <email address hidden>
Date: Wed Feb 10 22:53:50 2016 +0800

    replace string format arguments with function parameters

    There are files containing string format arguments inside
    logging messages. Using logging function parameters
    should be preferred.

    Change-Id: Ic053903056ba3479a787aad6e9a359ba1efc35f8
    Closes-Bug: #1321274

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/manila 2.0.0.0b3

This issue was fixed in the openstack/manila 2.0.0.0b3 development milestone.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-openstackclient 2.2.0

This issue was fixed in the openstack/python-openstackclient 2.2.0 release.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/tacker 0.4.0

This issue was fixed in the openstack/tacker 0.4.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/magnum 2.0.0

This issue was fixed in the openstack/magnum 2.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.