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. See: http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html Change-Id: Iaa4958c89fa6f5fa11189d5086b1372ccab01316
This commit is contained in:
parent
ccb1b5849e
commit
ea4c07c57a
@ -20,7 +20,6 @@ from werkzeug import datastructures
|
|||||||
|
|
||||||
from distil import exceptions as ex
|
from distil import exceptions as ex
|
||||||
from distil.i18n import _
|
from distil.i18n import _
|
||||||
from distil.i18n import _LE
|
|
||||||
from distil import context
|
from distil import context
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from distil.common import wsgi
|
from distil.common import wsgi
|
||||||
@ -184,8 +183,8 @@ def get_request_args():
|
|||||||
|
|
||||||
|
|
||||||
def abort_and_log(status_code, descr, exc=None):
|
def abort_and_log(status_code, descr, exc=None):
|
||||||
LOG.error(_LE("Request aborted with status code %(code)s and "
|
LOG.error(("Request aborted with status code %(code)s and "
|
||||||
"message '%(message)s'"),
|
"message '%(message)s'"),
|
||||||
{'code': status_code, 'message': descr})
|
{'code': status_code, 'message': descr})
|
||||||
|
|
||||||
if exc is not None:
|
if exc is not None:
|
||||||
|
@ -19,13 +19,3 @@ _translators = TranslatorFactory(domain='zaqar')
|
|||||||
|
|
||||||
# The primary translation function using the well-known name "_"
|
# The primary translation function using the well-known name "_"
|
||||||
_ = _translators.primary
|
_ = _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
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user