From 19b9849e5a56d32ceba5e944f03b03af3a6befb4 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Mon, 12 May 2014 12:08:34 +0200 Subject: [PATCH] debug level logs should not be translated According to the OpenStack translation policy available at https://wiki.openstack.org/wiki/LoggingStandards debug messages should not be translated. Like mentioned in several changes in Nova by garyk this is to help prioritize log translation. Change-Id: I558e855175d382cf3ac739f91d66b728b5ac2a34 --- rally/benchmark/context/cleanup/cleanup.py | 4 ++-- rally/benchmark/scenarios/vm/vmtasks.py | 6 +++--- rally/sshutils.py | 6 +++--- rally/utils.py | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/rally/benchmark/context/cleanup/cleanup.py b/rally/benchmark/context/cleanup/cleanup.py index b005491f8f..8a87497943 100644 --- a/rally/benchmark/context/cleanup/cleanup.py +++ b/rally/benchmark/context/cleanup/cleanup.py @@ -79,7 +79,7 @@ class ResourceCleaner(base.Context): try: cleanup_methods[service]() except Exception as e: - LOG.debug(_("Not all resources were cleaned."), + LOG.debug("Not all resources were cleaned.", exc_info=sys.exc_info()) LOG.warning(_('Unable to fully cleanup the cloud: %s') % (e.message)) @@ -90,7 +90,7 @@ class ResourceCleaner(base.Context): admin = osclients.Clients(self.admin) utils.delete_keystone_resources(admin.keystone()) except Exception as e: - LOG.debug(_("Not all resources were cleaned."), + LOG.debug("Not all resources were cleaned.", exc_info=sys.exc_info()) LOG.warning(_('Unable to fully cleanup keystone service: %s') % (e.message)) diff --git a/rally/benchmark/scenarios/vm/vmtasks.py b/rally/benchmark/scenarios/vm/vmtasks.py index f40b4bf29e..e4989c4bf2 100644 --- a/rally/benchmark/scenarios/vm/vmtasks.py +++ b/rally/benchmark/scenarios/vm/vmtasks.py @@ -73,7 +73,7 @@ class VMTasks(nova_utils.NovaScenario, vm_utils.VMScenario): LOG.warning(_("Script %s did not output valid JSON.") % script) self._delete_server(server) - LOG.debug(_("Output streams from in-instance script execution: " - "stdout: %(stdout)s, stderr: $(stderr)s") % dict( - stdout=out, stderr=err)) + LOG.debug("Output streams from in-instance script execution: " + "stdout: %(stdout)s, stderr: $(stderr)s" % dict( + stdout=out, stderr=err)) return {"data": out, "errors": err} diff --git a/rally/sshutils.py b/rally/sshutils.py index d319617fb5..3bf4da5d00 100644 --- a/rally/sshutils.py +++ b/rally/sshutils.py @@ -182,14 +182,14 @@ class SSH(object): if session.recv_ready(): data = session.recv(4096) - LOG.debug(_('stdout: %r') % data) + LOG.debug('stdout: %r' % data) if stdout is not None: stdout.write(data) continue if session.recv_stderr_ready(): stderr_data = session.recv_stderr(4096) - LOG.debug(_('stderr: %r') % stderr_data) + LOG.debug('stderr: %r' % stderr_data) if stderr is not None: stderr.write(stderr_data) continue @@ -253,7 +253,7 @@ class SSH(object): try: return self.execute('uname') except (socket.error, SSHError) as e: - LOG.debug(_('Ssh is still unavailable: %r') % e) + LOG.debug('Ssh is still unavailable: %r' % e) time.sleep(interval) if time.time() > (start_time + timeout): raise SSHTimeout(_('Timeout waiting for "%s"') % self.host) diff --git a/rally/utils.py b/rally/utils.py index 2dffa6d778..81e08d905d 100644 --- a/rally/utils.py +++ b/rally/utils.py @@ -187,7 +187,7 @@ def load_plugins(directory): fp, pathname, descr = imp.find_module(plugin, [directory]) imp.load_module(plugin, fp, pathname, descr) fp.close() - LOG.debug(_("Load plugin from file %s") % fullpath) + LOG.debug("Load plugin from file %s" % fullpath) except Exception as e: LOG.error(_("Couldn't load module from %(path)s: %(msg)s") % {"path": fullpath, "msg": e.message})