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)
Reviewed: https:/ /review. openstack. org/416455 /git.openstack. org/cgit/ openstack/ magnum/ commit/ ?id=2ee054c1f5f 5cd48f007b51c60 0133cbad376da5
Committed: https:/
Submitter: Jenkins
Branch: master
commit 2ee054c1f5f5cd4 8f007b51c600133 cbad376da5 99cloud. net>
Author: melissaml <ma.lei@
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, docs.openstack. org/developer/ oslo.i18n/ guidelines. html#log- translation info(_LI( 'some message: variable=%s') % variable) info(_LI( 'some message: variable=%s'), variable)
rather than being done at the point of the logging call.
Ref:http://
For example:
LOG.
LOG.
Change-Id: Ifaf1dfe5896157 32e412c4e640cf4 6679abc9023
Closes-Bug: #1643463