← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1234283] Re: remove string formatting in log statements

 

** Changed in: keystone
       Status: Fix Committed => Fix Released

** Changed in: keystone
    Milestone: None => icehouse-1

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

Title:
  remove string formatting in log statements

Status in OpenStack Identity (Keystone):
  Fix Released

Bug description:
  This is based on comments in: https://review.openstack.org/#/c/46822/

  The python logging module supports passing args and kwargs to populate
  strings AFTER the logging level has been checked. That means that
  string formatting can be avoided if it's unnecessary due to the
  current logging level.

  So, any instance of:

    LOG.debug(_('The entity, %s, was not found.') % entity)

  Can be replaced with:

    LOG.debug(_('The entity, %s, was not found.'), entity)

  Which will be slightly more performant when debug logging is disabled.

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