Browse Source

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.

Partial-Bug: #1317950

Change-Id: Ic8b19ec49441e49492ea5c43475fc946e20057fe
changes/15/93015/5
Christian Berendt 8 years ago
parent
commit
36cc1d85f0
  1. 2
      openstack/common/hooks.py
  2. 10
      tests/unit/rpc/common.py

2
openstack/common/hooks.py

@ -83,7 +83,7 @@ class HookManager(object):
obj = extension.obj
hook_method = getattr(obj, method_type, None)
if hook_method:
msg = (_("Running %(name)s %(type)s-hook: %(obj)s") %
msg = ("Running %(name)s %(type)s-hook: %(obj)s" %
{'name': name, 'type': method_type, 'obj': obj})
LOG.debug(msg)
try:

10
tests/unit/rpc/common.py

@ -209,7 +209,7 @@ class BaseRpcTestCase(test_base.BaseTestCase):
@staticmethod
def echo(context, queue, value):
"""Calls echo in the passed queue."""
LOG.debug(_("Nested received %(queue)s, %(value)s")
LOG.debug("Nested received %(queue)s, %(value)s"
% {'queue': queue, 'value': value})
# TODO(comstud):
# so, it will replay the context and use the same REQID?
@ -218,7 +218,7 @@ class BaseRpcTestCase(test_base.BaseTestCase):
queue,
{"method": "echo",
"args": {"value": value}})
LOG.debug(_("Nested return %s"), ret)
LOG.debug("Nested return %s", ret)
return value
nested = Nested()
@ -386,13 +386,13 @@ class TestReceiver(object):
@staticmethod
def echo(context, value):
"""Simply returns whatever value is sent in."""
LOG.debug(_("Received %s"), value)
LOG.debug("Received %s", value)
return value
@staticmethod
def synced_echo(context, value, callid):
"""Waits on the event identified by callid."""
LOG.debug(_("Received %s"), value)
LOG.debug("Received %s", value)
global synced_echo_call
synced_echo_call.wait(callid)
return value
@ -405,7 +405,7 @@ class TestReceiver(object):
@staticmethod
def context(context, value):
"""Returns dictionary version of context."""
LOG.debug(_("Received %s"), context)
LOG.debug("Received %s", context)
return context.to_dict()
@staticmethod

Loading…
Cancel
Save