提交 7c167ca7 编写于 作者: L Lukáš Doktor

dispatcher: Log exception for VarianterDispatcher on error

Currently the user only gets information that something went wrong,
let's log the original exception into `avocado.debug` logger on
dispatcher error to allow simple debugging.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 414e5391
......@@ -21,6 +21,7 @@ import sys
from stevedore import EnabledExtensionManager
from .settings import settings
from ..utils import stacktrace
class Dispatcher(EnabledExtensionManager):
......@@ -242,6 +243,7 @@ class VarianterDispatcher(Dispatcher):
except KeyboardInterrupt:
raise
except: # catch any exception pylint: disable=W0702
stacktrace.log_exc_info(sys.exc_info(), logger='avocado.debug')
log = logging.getLogger("avocado.app")
log.error('Error running method "%s" of plugin "%s": %s',
method_name, ext.name, sys.exc_info()[1])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册