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