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: I9561513f28952a8710f5d4ea5c4a6a9c544b3e1e
This commit is contained in:
parent
e9b0170405
commit
4badcee9f0
@ -23,13 +23,3 @@ _translators = oslo_i18n.TranslatorFactory(domain='oslo_cache')
|
||||
|
||||
# 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
|
||||
|
@ -24,7 +24,6 @@ from oslo_utils import timeutils
|
||||
import six
|
||||
|
||||
from oslo_cache._i18n import _
|
||||
from oslo_cache._i18n import _LW
|
||||
from oslo_cache import exception
|
||||
|
||||
|
||||
@ -422,10 +421,10 @@ class MongoApi(object):
|
||||
existing_value = index_data['expireAfterSeconds']
|
||||
fld_present = 'doc_date' in index_data['key'][0]
|
||||
if fld_present and existing_value > -1 and ttl_seconds < 1:
|
||||
msg = _LW('TTL index already exists on db collection '
|
||||
'<%(c_name)s>, remove index <%(indx_name)s> '
|
||||
'first to make updated mongo_ttl_seconds value '
|
||||
'to be effective')
|
||||
msg = ('TTL index already exists on db collection '
|
||||
'<%(c_name)s>, remove index <%(indx_name)s> '
|
||||
'first to make updated mongo_ttl_seconds value '
|
||||
'to be effective')
|
||||
LOG.warning(msg, {'c_name': coll_name,
|
||||
'indx_name': indx_name})
|
||||
|
||||
|
@ -43,7 +43,6 @@ from oslo_log import log
|
||||
from oslo_utils import importutils
|
||||
|
||||
from oslo_cache._i18n import _
|
||||
from oslo_cache._i18n import _LE
|
||||
from oslo_cache import _opts
|
||||
from oslo_cache import exception
|
||||
|
||||
@ -115,8 +114,8 @@ def _build_cache_config(conf):
|
||||
try:
|
||||
(argname, argvalue) = argument.split(':', 1)
|
||||
except ValueError:
|
||||
msg = _LE('Unable to build cache config-key. Expected format '
|
||||
'"<argname>:<value>". Skipping unknown format: %s')
|
||||
msg = ('Unable to build cache config-key. Expected format '
|
||||
'"<argname>:<value>". Skipping unknown format: %s')
|
||||
_LOG.error(msg, argument)
|
||||
continue
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user