]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Logging not using oslo.i18n guidelines
authorSean McGinnis <sean_mcginnis@dell.com>
Thu, 19 Mar 2015 13:37:49 +0000 (08:37 -0500)
committerSean McGinnis <sean_mcginnis@dell.com>
Thu, 19 Mar 2015 17:28:12 +0000 (12:28 -0500)
commit3578d9e3411ff65636808bef2979f5bdefba144c
tree417ce50a1b2d4db6fa20c13de4ededae21ea2d4b
parent3e66225f9eeb8feacb17ea4ff99dc554e74a2302
Logging not using oslo.i18n guidelines

Part of multi-patch set for easier chunks.

There have been quite a few instances found where the
i18n guidelines are not being followed. I believe this
has helped lead to some of the confusion around how to
correctly do this. Other developers see this code and
assume it is an example of the correct usage.

This patch attempts to clean up most of those violations
in the existing codebase to hopefully help avoid some of
that confusion in reviews.

Some issues address:
* Correct log translation markers for different log levels
* Passing format values as arguments to call, not preformatting
* Not forcing translation via six.text_type and others

Guidelines can be found here:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html

Hacking checks will not be able to identify all violations of
the guidelines, but it could be useful for catching obvious ones
such as LOG.info("No markers!").

Change-Id: I38f52c6408b47ccb59ec2064b360f7d4427d6830
Partial-bug: 1433216
30 files changed:
HACKING.rst
cinder/api/__init__.py
cinder/api/contrib/admin_actions.py
cinder/api/contrib/hosts.py
cinder/api/contrib/qos_specs_manage.py
cinder/api/contrib/snapshot_actions.py
cinder/api/contrib/volume_image_metadata.py
cinder/api/contrib/volume_replication.py
cinder/api/extensions.py
cinder/api/middleware/fault.py
cinder/api/openstack/wsgi.py
cinder/api/v1/snapshots.py
cinder/api/v2/snapshots.py
cinder/cmd/volume_usage_audit.py
cinder/compute/nova.py
cinder/consistencygroup/api.py
cinder/exception.py
cinder/hacking/checks.py
cinder/image/glance.py
cinder/image/image_utils.py
cinder/keymgr/barbican.py
cinder/keymgr/conf_key_mgr.py
cinder/quota.py
cinder/quota_utils.py
cinder/service.py
cinder/ssh_utils.py
cinder/tests/test_hacking.py
cinder/transfer/api.py
cinder/utils.py
cinder/wsgi.py