summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Hellmann <doug.hellmann@dreamhost.com>2014-01-08 19:35:05 +0000
committerDoug Hellmann <doug.hellmann@dreamhost.com>2014-01-08 19:35:05 +0000
commit1ae0aac511bffed82d981e320c2b460ff419886f (patch)
tree00737652bf49c92b04cf05a073cdb761aa55be68
parentd6b7fd1218634a74680dfada999c11de6c3e9bc5 (diff)
downloadoslo-utils-1ae0aac511bffed82d981e320c2b460ff419886f.tar.gz
Update oslo log messages with translation domains
Update the incubator code to use different domains for log messages at different levels. Update the import exceptions setting for hacking to allow multiple functions to be imported from gettextutils on one line. bp log-messages-translation-domain Change-Id: I6ce0f4a59438612ce74c46b3ee9398bef24c0c19
-rw-r--r--openstack/common/excutils.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/openstack/common/excutils.py b/openstack/common/excutils.py
index 934b0d0..fb9f03e 100644
--- a/openstack/common/excutils.py
+++ b/openstack/common/excutils.py
@@ -24,7 +24,7 @@ import traceback
import six
-from openstack.common.gettextutils import _
+from openstack.common.gettextutils import _LE
class save_and_reraise_exception(object):
@@ -59,7 +59,7 @@ class save_and_reraise_exception(object):
def __exit__(self, exc_type, exc_val, exc_tb):
if exc_type is not None:
- logging.error(_('Original exception being dropped: %s'),
+ logging.error(_LE('Original exception being dropped: %s'),
traceback.format_exception(self.type_,
self.value,
self.tb))
@@ -88,8 +88,8 @@ def forever_retry_uncaught_exceptions(infunc):
if (cur_time - last_log_time > 60 or
this_exc_message != last_exc_message):
logging.exception(
- _('Unexpected exception occurred %d time(s)... '
- 'retrying.') % exc_count)
+ _LE('Unexpected exception occurred %d time(s)... '
+ 'retrying.') % exc_count)
last_log_time = cur_time
last_exc_message = this_exc_message
exc_count = 0