From c7305af78049f94dedcbb55480b91a3c6d843b9f Mon Sep 17 00:00:00 2001 From: Todd Willey Date: Tue, 4 Jan 2011 00:23:35 -0500 Subject: Apply logging changes as a giant patch to work around the cloudpipe delete + add issue in the original patch. --- nova/exception.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index 277033e0f..7c6675e62 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -21,10 +21,8 @@ Nova base exception handling, including decorator for re-raising Nova-type exceptions. SHOULD include dedicated exception logging. """ -import logging -import sys -import traceback - +from nova import log as logging +LOG = logging.getLogger('nova.exception') class ProcessExecutionError(IOError): @@ -84,7 +82,7 @@ def wrap_exception(f): except Exception, e: if not isinstance(e, Error): #exc_type, exc_value, exc_traceback = sys.exc_info() - logging.exception(_('Uncaught exception')) + LOG.exception(_('Uncaught exception')) #logging.error(traceback.extract_stack(exc_traceback)) raise Error(str(e)) raise -- cgit From b9576a9f73195656f4a0a1327cd6bee3c4a6b6c9 Mon Sep 17 00:00:00 2001 From: Todd Willey Date: Tue, 4 Jan 2011 00:26:41 -0500 Subject: Final few log tweaks, i18n, levels, including contexts, etc. --- nova/exception.py | 1 + 1 file changed, 1 insertion(+) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index 7c6675e62..7680e534a 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -24,6 +24,7 @@ Nova-type exceptions. SHOULD include dedicated exception logging. from nova import log as logging LOG = logging.getLogger('nova.exception') + class ProcessExecutionError(IOError): def __init__(self, stdout=None, stderr=None, exit_code=None, cmd=None, -- cgit