Fix some LOG invocations and messages

LOG.xxx("Hello %s" % xyz) should be LOG.xxx("Hello %s", xyz).
This allows the logging package to skip creating the
formatted log message if the message is not going to be emitted because
of the current log level.

The change touches error, warning and info LOG messages.

Adjust test suite for the above change since LOG now uses two parameters
instead of one.

Fix grammar, add missing "." to log messages in some places.

Change-Id: I86404c34502f07ed6dbda1c82b13db888c60f074
This commit is contained in:
Andreas Jaeger
2014-08-31 09:55:03 +02:00
parent 0f44e6f681
commit 5b76212da4
23 changed files with 57 additions and 58 deletions

View File

@@ -52,7 +52,7 @@ class FaultWrapper(base_wsgi.Middleware):
status = 500
msg_dict = dict(url=req.url, status=status)
LOG.info(_("%(url)s returned with HTTP %(status)d") % msg_dict)
LOG.info(_("%(url)s returned with HTTP %(status)d"), msg_dict)
outer = self.status_to_type(status)
if headers:
outer.headers = headers