Closes #27904: Improved logging statements to defer formatting until needed.

This commit is contained in:
Vinay Sajip 2016-08-31 08:22:29 +01:00
parent ee47e5cf8a
commit dd917f84e3
15 changed files with 25 additions and 26 deletions

View file

@ -329,8 +329,7 @@ class Command:
# -- External world manipulation -----------------------------------
def warn(self, msg):
log.warn("warning: %s: %s\n" %
(self.get_command_name(), msg))
log.warn("warning: %s: %s\n", self.get_command_name(), msg)
def execute(self, func, args, msg=None, level=1):
util.execute(func, args, msg, dry_run=self.dry_run)