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: Ic537412399b1cbc7b6e921f4d1c5004189067e1d
Closes-Bug: 1674577
This commit is contained in:
D G Lee 2017-03-21 13:41:57 +08:00 committed by D G Lee
parent 8c5f348b60
commit cba09827c6
2 changed files with 7 additions and 19 deletions

View File

@ -23,13 +23,3 @@ _translators = oslo_i18n.TranslatorFactory(domain='oslo_reports')
# 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

@ -71,8 +71,6 @@ import traceback
from oslo_utils import timeutils
from oslo_reports._i18n import _LE
from oslo_reports._i18n import _LW
from oslo_reports.generators import conf as cgen
from oslo_reports.generators import process as prgen
from oslo_reports.generators import threading as tgen
@ -154,11 +152,11 @@ class GuruMeditation(object):
else:
if hasattr(signal, 'SIGUSR1'):
# TODO(dims) We need to remove this in the "O" release cycle
LOG.warning(_LW("Guru meditation now registers SIGUSR1 and "
"SIGUSR2 by default for backward "
"compatibility. SIGUSR1 will no longer be "
"registered in a future release, so please "
"use SIGUSR2 to generate reports."))
LOG.warning("Guru meditation now registers SIGUSR1 and "
"SIGUSR2 by default for backward "
"compatibility. SIGUSR1 will no longer be "
"registered in a future release, so please "
"use SIGUSR2 to generate reports.")
cls._setup_signal(signal.SIGUSR1,
version, service_name, log_dir)
if hasattr(signal, 'SIGUSR2'):
@ -171,8 +169,8 @@ class GuruMeditation(object):
st = os.stat(filepath)
if not bool(st.st_mode & stat.S_IRGRP):
LOG.error(_LE("Guru Meditation Report does not have read "
"permissions to '%s' file."), filepath)
LOG.error("Guru Meditation Report does not have read "
"permissions to '%s' file.", filepath)
def _handler():
mtime = time.time()