remove string formatting in log statements
Bug #1234283 reported by
Dolph Mathews
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Fix Released
|
Low
|
Lars Butler |
Bug Description
This is based on comments in: https:/
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.
tags: | added: low-hanging-fruit |
tags: | added: performance |
Changed in keystone: | |
assignee: | nobody → Lars Butler (lars-butler) |
status: | Triaged → In Progress |
Changed in keystone: | |
milestone: | none → icehouse-1 |
status: | Fix Committed → Fix Released |
Changed in keystone: | |
milestone: | icehouse-1 → 2014.1 |
To post a comment you must log in.
Fix proposed to branch: master /review. openstack. org/54381
Review: https:/