← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1596829] Re: String interpolation should be delayed at logging calls

 

Reviewed:  https://review.openstack.org/349783
Committed: https://git.openstack.org/cgit/openstack/os-vif/commit/?id=ff28181fddaddbff855201000a1945af75168724
Submitter: Jenkins
Branch:    master

commit ff28181fddaddbff855201000a1945af75168724
Author: Takashi NATSUME <natsume.takashi@xxxxxxxxxxxxx>
Date:   Tue Aug 2 13:13:39 2016 +0900

    Fix logging calls
    
    This patch fixes the following items.
    
    - Missing a marker function _LI
    - String interpolation
    - A typo (ENsuring -> Ensuring)
    
    * Guidelines for Use In OpenStack — oslo.i18n
    http://docs.openstack.org/developer/oslo.i18n/guidelines.html
    
    Change-Id: I4cc5781100fd2d2be3dd5c44c789396f3fdbd649
    Closes-Bug: #1596829


** Changed in: os-vif
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1596829

Title:
  String interpolation should be delayed at logging calls

Status in Ceilometer:
  New
Status in Glance:
  In Progress
Status in glance_store:
  New
Status in heat:
  New
Status in Ironic:
  Fix Released
Status in masakari:
  In Progress
Status in Murano:
  Fix Released
Status in networking-vsphere:
  Fix Released
Status in neutron:
  Fix Released
Status in OpenStack Compute (nova):
  In Progress
Status in os-brick:
  Fix Released
Status in os-vif:
  Fix Released
Status in python-cinderclient:
  Fix Released
Status in python-glanceclient:
  Fix Released
Status in python-neutronclient:
  Fix Released
Status in OpenStack Object Storage (swift):
  New
Status in taskflow:
  New

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.

  Wrong: LOG.debug('Example: %s' % 'bad')
  Right: LOG.debug('Example: %s', 'good')

  See the following guideline.

  * http://docs.openstack.org/developer/oslo.i18n/guidelines.html
  #adding-variables-to-log-messages

  The rule for it should be added to hacking checks.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ceilometer/+bug/1596829/+subscriptions


References