Add a hacking rule for string interpolation at logging

From [1], string interpolation should be delayed to be handled by
the logging code, rather than being done at the point of the logging
call. Add a hacking rule, [M331], to delay the string interpolation.

[1] https://docs.openstack.org/oslo.i18n/latest/user/guidelines.html#adding-variables-to-log-messages
Change-Id: Ibf0ac960ae84e935979f93f3a0dec8d774aade78
Closes-Bug: #1705634
This commit is contained in:
Sharat Sharma
2017-07-21 14:31:21 +05:30
parent 281668a000
commit b38dceec50
32 changed files with 293 additions and 149 deletions

View File

@@ -148,7 +148,7 @@ class WorkflowController(object):
for t_e in task_execs
]
LOG.debug("Commands to rerun workflow tasks: %s" % cmds)
LOG.debug("Commands to rerun workflow tasks: %s", cmds)
return cmds