Remove log translations

Log messages are no longer being translated. This removes all use of the
_LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.

Change-Id: I555070ef0cd87ab58147944847c6bbc4ca49321d
This commit is contained in:
ritesh.arya 2017-07-05 16:58:46 +05:30 committed by Moisés Guimarães de Medeiros
parent 45eba574e3
commit 333bcaf1c9
2 changed files with 2 additions and 12 deletions

View File

@ -24,13 +24,3 @@ _translators = oslo_i18n.TranslatorFactory(domain=DOMAIN)
# The primary translation function using the well-known name "_"
_ = _translators.primary
# Translators for log levels.
#
# The abbreviated names are meant to reflect the usual use of a short
# name like '_'. The "L" is for "log" and the other letter comes from
# the level.
_LI = _translators.log_info
_LW = _translators.log_warning
_LE = _translators.log_error
_LC = _translators.log_critical

View File

@ -29,7 +29,7 @@ from oslo_serialization import base64
from oslo_utils import encodeutils
from cursive import exception
from cursive.i18n import _, _LE
from cursive.i18n import _
from cursive import verifiers
LOG = logging.getLogger(__name__)
@ -342,7 +342,7 @@ def get_certificate(context, signature_certificate_uuid):
# The problem encountered may be backend-specific, since castellan
# can use different backends. Rather than importing all possible
# backends here, the generic "Exception" is used.
msg = (_LE("Unable to retrieve certificate with ID %(id)s: %(e)s")
msg = ("Unable to retrieve certificate with ID %(id)s: %(e)s"
% {'id': signature_certificate_uuid,
'e': encodeutils.exception_to_unicode(e)})
LOG.error(msg)