replace string format arguments with function parameters

There are files containing string format arguments inside
logging messages. Using logging function parameters should
be preferred.

Change-Id: Iaa15bc52d1d8832032cc46205effb49630cea494
Closes-Bug: #1321274
This commit is contained in:
Javeme 2016-01-22 20:36:43 +08:00
parent 7aa6856f6c
commit 6e2f4efb19
2 changed files with 5 additions and 5 deletions

View File

@ -141,7 +141,7 @@ class Server(object):
self.log_queue,
self.ready))
self.process.start()
LOG.debug("Server process started: pid: %d" % self.process.pid)
LOG.debug("Server process started: pid: %d", self.process.pid)
def _run_server(self, conf, url, log_queue, ready):
server_configurer(log_queue)
@ -161,8 +161,8 @@ class Server(object):
LOG.debug("Waiting for the stop signal ...")
time.sleep(1)
self.rpc_server.stop()
LOG.debug("Leaving process T:%s Pid:%d" % (str(target),
os.getpid()))
LOG.debug("Leaving process T:%s Pid:%d", (str(target),
os.getpid()))
def cleanup(self):
LOG.debug("Stopping server")
@ -217,7 +217,7 @@ class MutliprocTestCase(utils.SkipIfNoTransportURL):
def spawn_server(self, name, wait_for_server=False, topic=None):
srv = Server(self.conf, self.log_queue, self.url, name, topic)
LOG.debug("[SPAWN] %s (starting)..." % srv.name)
LOG.debug("[SPAWN] %s (starting)...", srv.name)
srv.start()
if wait_for_server:
while not srv.ready.value:

View File

@ -446,7 +446,7 @@ def main():
with open('./oslo_res_%s.txt' % args.server, 'a+') as f:
f.write(log_msg + '\n')
LOG.info("calls finished, wait %d seconds" % args.exit_wait)
LOG.info("calls finished, wait %d seconds", args.exit_wait)
time.sleep(args.exit_wait)