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: I3552767976807a9851af69b1fa4f86ac25943025
This commit is contained in:
yanxubin
2017-03-22 16:01:23 +08:00
parent eb038e4af0
commit f605888e32
27 changed files with 154 additions and 170 deletions

View File

@@ -22,7 +22,6 @@ import sys
from oslo_config import cfg
from oslo_log import log as logging
from watcher._i18n import _LI
from watcher.common import service
from watcher import conf
@@ -39,11 +38,11 @@ def main():
server = service.WSGIService('watcher-api', CONF.api.enable_ssl_api)
if host == '127.0.0.1':
LOG.info(_LI('serving on 127.0.0.1:%(port)s, '
'view at %(protocol)s://127.0.0.1:%(port)s') %
LOG.info('serving on 127.0.0.1:%(port)s, '
'view at %(protocol)s://127.0.0.1:%(port)s' %
dict(protocol=protocol, port=port))
else:
LOG.info(_LI('serving on %(protocol)s://%(host)s:%(port)s') %
LOG.info('serving on %(protocol)s://%(host)s:%(port)s' %
dict(protocol=protocol, host=host, port=port))
launcher = service.launch(CONF, server, workers=server.workers)

View File

@@ -22,7 +22,6 @@ import sys
from oslo_log import log as logging
from watcher._i18n import _LI
from watcher.applier import manager
from watcher.common import service as watcher_service
from watcher import conf
@@ -34,7 +33,7 @@ CONF = conf.CONF
def main():
watcher_service.prepare_service(sys.argv, CONF)
LOG.info(_LI('Starting Watcher Applier service in PID %s'), os.getpid())
LOG.info('Starting Watcher Applier service in PID %s', os.getpid())
applier_service = watcher_service.Service(manager.ApplierManager)

View File

@@ -22,7 +22,6 @@ import sys
from oslo_log import log as logging
from watcher._i18n import _LI
from watcher.common import service as watcher_service
from watcher import conf
from watcher.decision_engine import gmr
@@ -38,7 +37,7 @@ def main():
watcher_service.prepare_service(sys.argv, CONF)
gmr.register_gmr_plugins()
LOG.info(_LI('Starting Watcher Decision Engine service in PID %s'),
LOG.info('Starting Watcher Decision Engine service in PID %s',
os.getpid())
syncer = sync.Syncer()

View File

@@ -22,7 +22,6 @@ import sys
from oslo_log import log as logging
from watcher._i18n import _LI
from watcher.common import service as service
from watcher import conf
from watcher.decision_engine import sync
@@ -32,10 +31,10 @@ CONF = conf.CONF
def main():
LOG.info(_LI('Watcher sync started.'))
LOG.info('Watcher sync started.')
service.prepare_service(sys.argv, CONF)
syncer = sync.Syncer()
syncer.sync()
LOG.info(_LI('Watcher sync finished.'))
LOG.info('Watcher sync finished.')