From 8c2bb589764a2c552acffe2fafc3662e25a4b2ca Mon Sep 17 00:00:00 2001 From: lcsong Date: Tue, 18 Apr 2017 10:56:48 +0800 Subject: [PATCH] Remove log translations Log messages are no longer being translated. This removes all use of the _LE, _LI, _LW and _LC 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 It will be a giant patch if all these _LE, _LI, _LW and _LC being deleted within one patch, so this patch only delete _LI; _LW, _LC and _LE has been handled in previous patchies. This is the last patch for sahara to delete log translations. Change-Id: I73e99ca7fd5bc0cd8df7cce30b5f12e00e70149c --- sahara/i18n.py | 7 ------- sahara/plugins/vanilla/hadoop2/run_scripts.py | 5 ++--- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/sahara/i18n.py b/sahara/i18n.py index 977a246..6c2ccff 100644 --- a/sahara/i18n.py +++ b/sahara/i18n.py @@ -23,10 +23,3 @@ _translators = oslo_i18n.TranslatorFactory(domain='sahara') # 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 diff --git a/sahara/plugins/vanilla/hadoop2/run_scripts.py b/sahara/plugins/vanilla/hadoop2/run_scripts.py index 033a89d..ba89be4 100644 --- a/sahara/plugins/vanilla/hadoop2/run_scripts.py +++ b/sahara/plugins/vanilla/hadoop2/run_scripts.py @@ -19,7 +19,6 @@ from oslo_log import log as logging from sahara import context from sahara.i18n import _ -from sahara.i18n import _LI from sahara.plugins import utils as pu from sahara.plugins.vanilla.hadoop2 import config_helper as c_helper from sahara.plugins.vanilla.hadoop2 import oozie_helper @@ -248,5 +247,5 @@ def start_hiveserver_process(pctx, instance): r.write_file_to('/tmp/create_hive_db.sql', sql_script) _hive_create_db(r) _hive_metastore_start(r) - LOG.info(_LI("Hive Metastore server at {host} has been " - "started").format(host=instance.hostname())) + LOG.info("Hive Metastore server at {host} has been " + "started".format(host=instance.hostname()))