From fda7af32fac1f85033597c368049b8ad0f2490d2 Mon Sep 17 00:00:00 2001 From: Tao Li Date: Tue, 21 Mar 2017 13:48:59 +0800 Subject: [PATCH] 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: I9d94735ace6f0dde822bfb37e5c94195a010d837 --- craton/_i18n.py | 10 ---------- craton/workflow/worker.py | 6 ++---- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/craton/_i18n.py b/craton/_i18n.py index 24a44d4..0944f11 100644 --- a/craton/_i18n.py +++ b/craton/_i18n.py @@ -17,13 +17,3 @@ _C = _translators.contextual_form # The plural translation function using the name "_P" _P = _translators.plural_form - -# 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 diff --git a/craton/workflow/worker.py b/craton/workflow/worker.py index c865440..82e1c69 100644 --- a/craton/workflow/worker.py +++ b/craton/workflow/worker.py @@ -9,8 +9,6 @@ from taskflow.jobs import backends as boards from taskflow.persistence import backends as persistence_backends from zake import fake_client -from craton._i18n import _LI - LOG = logging.getLogger(__name__) CONF = cfg.CONF @@ -55,11 +53,11 @@ def start(conf): if conf.taskflow.db_upgrade: with contextlib.closing(persistence.get_connection()) as conn: - LOG.info(_LI('Checking for database schema upgrade')) + LOG.info('Checking for database schema upgrade') conn.upgrade() my_name = uuidutils.generate_uuid() - LOG.info(_LI('I am %s'), my_name) + LOG.info('I am %s', my_name) board = _get_jobboard_backend(conf, persistence=persistence)