Interpolate strings using logging own methods

Bug #1643463 reported by zhangyanxian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
melissaml

Bug Description

String interpolation should be delayed to be handled by the logging code, rather than being done at the point of the logging call.
Ref:http://docs.openstack.org/developer/oslo.i18n/guidelines.html#log-translation
For example:
in cluster_client.py (
LOG.info(_LI('Cluster %s succeeded.') % cluster_id)

affects: devstack → magnum
description: updated
Changed in magnum:
assignee: nobody → zhangyanxian (zhang-yanxian)
Changed in magnum:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on magnum (master)

Change abandoned by zhangyanxian (zhangyanxianmail@163.com) on branch: master
Review: https://review.openstack.org/400103
Reason: Same patch is already active: https://review.openstack.org/#/c/399840

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

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

Changed in magnum:
assignee: zhangyanxian (zhang-yanxian) → melissaml (ma-lei)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on magnum (master)

Change abandoned by melissaml (ma.lei@99cloud.net) on branch: master
Review: https://review.openstack.org/401871

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

Reviewed: https://review.openstack.org/416455
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=2ee054c1f5f5cd48f007b51c600133cbad376da5
Submitter: Jenkins
Branch: master

commit 2ee054c1f5f5cd48f007b51c600133cbad376da5
Author: melissaml <ma.lei@99cloud.net>
Date: Wed Jan 4 15:11:33 2017 +0800

    Modify variable's using method in Log Messages

    String interpolation should be delayed to be handled by the logging code,
    rather than being done at the point of the logging call.
    Ref:http://docs.openstack.org/developer/oslo.i18n/guidelines.html#log-translation
    For example:
    LOG.info(_LI('some message: variable=%s') % variable)
    LOG.info(_LI('some message: variable=%s'), variable)

    Change-Id: Ifaf1dfe589615732e412c4e640cf46679abc9023
    Closes-Bug: #1643463

Changed in magnum:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/magnum 4.0.0

This issue was fixed in the openstack/magnum 4.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.