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