diff options
author | xuqiankun <qkxu@fiberhome.com> | 2017-03-21 14:05:54 +0800 |
---|---|---|
committer | xuqiankun <qkxu@fiberhome.com> | 2017-04-15 09:15:48 +0800 |
commit | a584a85bdbca675e2eb65e6dc7db4dba84a3df0c (patch) | |
tree | bdc6432aefca26b515395e065ac85df9ae852b47 /ceilometer/event | |
parent | 4c995d35cb157a407776987af27468f2e28ede09 (diff) | |
download | ceilometer-a584a85bdbca675e2eb65e6dc7db4dba84a3df0c.tar.gz |
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: I836a018f971fb71bfa35e76f00433a263440de18
Diffstat (limited to 'ceilometer/event')
-rw-r--r-- | ceilometer/event/endpoint.py | 3 | ||||
-rw-r--r-- | ceilometer/event/trait_plugins.py | 18 |
2 files changed, 9 insertions, 12 deletions
diff --git a/ceilometer/event/endpoint.py b/ceilometer/event/endpoint.py index 0abc4ed1..4db915a9 100644 --- a/ceilometer/event/endpoint.py +++ b/ceilometer/event/endpoint.py @@ -17,7 +17,6 @@ import oslo_messaging from stevedore import extension from ceilometer.event import converter as event_converter -from ceilometer.i18n import _LE from ceilometer import messaging LOG = log.getLogger(__name__) @@ -63,5 +62,5 @@ class EventsNotificationEndpoint(object): except Exception: if not self.manager.conf.notification.ack_on_event_error: return oslo_messaging.NotificationResult.REQUEUE - LOG.error(_LE('Fail to process a notification'), exc_info=True) + LOG.error('Fail to process a notification', exc_info=True) return oslo_messaging.NotificationResult.HANDLED diff --git a/ceilometer/event/trait_plugins.py b/ceilometer/event/trait_plugins.py index a4b5fa1d..d41a4d9b 100644 --- a/ceilometer/event/trait_plugins.py +++ b/ceilometer/event/trait_plugins.py @@ -20,8 +20,6 @@ from oslo_log import log from oslo_utils import timeutils import six -from ceilometer.i18n import _LW - LOG = log.getLogger(__name__) @@ -123,9 +121,9 @@ class SplitterTraitPlugin(TraitPluginBase): :param segment: Which segment to return. (int) default 0 :param max_split: Limit number of splits. Default: None (no limit) """ - LOG.warning(_LW('split plugin is deprecated, ' - 'add ".`split(%(sep)s, %(segment)d, ' - '%(max_split)d)`" to your jsonpath instead') % + LOG.warning('split plugin is deprecated, ' + 'add ".`split(%(sep)s, %(segment)d, ' + '%(max_split)d)`" to your jsonpath instead' % dict(sep=separator, segment=segment, max_split=(-1 if max_split is None @@ -213,17 +211,17 @@ class TimedeltaPlugin(TraitPluginBase): def trait_value(self, match_list): if len(match_list) != 2: - LOG.warning(_LW('Timedelta plugin is required two timestamp fields' - ' to create timedelta value.')) + LOG.warning('Timedelta plugin is required two timestamp fields' + ' to create timedelta value.') return start, end = match_list try: start_time = timeutils.parse_isotime(start[1]) end_time = timeutils.parse_isotime(end[1]) except Exception as err: - LOG.warning(_LW('Failed to parse date from set fields, both ' - 'fields %(start)s and %(end)s must be datetime: ' - '%(err)s') % + LOG.warning('Failed to parse date from set fields, both ' + 'fields %(start)s and %(end)s must be datetime: ' + '%(err)s' % dict(start=start[0], end=end[0], err=err) ) return |