diff options
author | Mike Durnosvistov <mdurnosvistov@mirantis.com> | 2014-09-18 19:07:59 +0300 |
---|---|---|
committer | Mike Durnosvistov <mdurnosvistov@mirantis.com> | 2014-10-21 06:40:05 +0000 |
commit | c7718b2d8d210b64030c309833cd8dcf9dba5cd6 (patch) | |
tree | 16aed697187b65b5114b0c3a49f69d0f58cd0f42 /nova/servicegroup/drivers | |
parent | 9fd059b938a2acca8bf5d58989c78d834fbb0ad8 (diff) | |
download | nova-c7718b2d8d210b64030c309833cd8dcf9dba5cd6.tar.gz |
Replacement `_` on `_LE` in all LOG.error
oslo.i18n uses different marker functions to separate the
translatable messages into different catalogs, which the translation
teams can prioritize translating. For details, please refer to:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html#guidelines-for-use-in-openstack
There were not marker fuctions some places in directory network.
This commit makes changes:
* Add missing marker functions
* Use ',' instead of '%' while adding variables to log messages
Change-Id: I5a8f381b6f8fdb4e8febe9e6a901f7cdc6846646
Diffstat (limited to 'nova/servicegroup/drivers')
-rw-r--r-- | nova/servicegroup/drivers/db.py | 2 | ||||
-rw-r--r-- | nova/servicegroup/drivers/mc.py | 2 | ||||
-rw-r--r-- | nova/servicegroup/drivers/zk.py | 7 |
3 files changed, 6 insertions, 5 deletions
diff --git a/nova/servicegroup/drivers/db.py b/nova/servicegroup/drivers/db.py index 0be32ce1a8..7a78748ced 100644 --- a/nova/servicegroup/drivers/db.py +++ b/nova/servicegroup/drivers/db.py @@ -101,7 +101,7 @@ class DbDriver(api.ServiceGroupDriver): # TODO(termie): make this pattern be more elegant. if getattr(service, 'model_disconnected', False): service.model_disconnected = False - LOG.error(_('Recovered model server connection!')) + LOG.error(_LE('Recovered model server connection!')) # TODO(vish): this should probably only catch connection errors except Exception: # pylint: disable=W0702 diff --git a/nova/servicegroup/drivers/mc.py b/nova/servicegroup/drivers/mc.py index 973d33ad66..ef254d8ee3 100644 --- a/nova/servicegroup/drivers/mc.py +++ b/nova/servicegroup/drivers/mc.py @@ -96,7 +96,7 @@ class MemcachedDriver(api.ServiceGroupDriver): # TODO(termie): make this pattern be more elegant. if getattr(service, 'model_disconnected', False): service.model_disconnected = False - LOG.error(_('Recovered model server connection!')) + LOG.error(_LE('Recovered model server connection!')) # TODO(vish): this should probably only catch connection errors except Exception: # pylint: disable=W0702 diff --git a/nova/servicegroup/drivers/zk.py b/nova/servicegroup/drivers/zk.py index 458256ac21..660dd50e80 100644 --- a/nova/servicegroup/drivers/zk.py +++ b/nova/servicegroup/drivers/zk.py @@ -21,7 +21,7 @@ from oslo.config import cfg from oslo.utils import importutils from nova import exception -from nova.i18n import _, _LE +from nova.i18n import _LE from nova.openstack.common import log as logging from nova.openstack.common import loopingcall from nova.servicegroup import api @@ -106,8 +106,9 @@ class ZooKeeperDriver(api.ServiceGroupDriver): member.leave() del self._memberships[key] except KeyError: - LOG.error(_('ZooKeeperDriver.leave: %(id)s has not joined to the ' - '%(gr)s group'), {'id': member_id, 'gr': group}) + LOG.error(_LE('ZooKeeperDriver.leave: %(id)s has not joined ' + 'to the %(gr)s group'), + {'id': member_id, 'gr': group}) def is_up(self, service_ref): group_id = service_ref['topic'] |