From 97858eca8a3ecf200a358b1eb9daac7c0c9a059b Mon Sep 17 00:00:00 2001 From: Brian Candler Date: Wed, 5 May 2021 09:39:30 +0100 Subject: [PATCH] Include backtrace in debug output when extension fails to load --- jupyter_server/extension/manager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jupyter_server/extension/manager.py b/jupyter_server/extension/manager.py index 7802333f19..d3f40d4da6 100644 --- a/jupyter_server/extension/manager.py +++ b/jupyter_server/extension/manager.py @@ -1,4 +1,6 @@ import importlib +import sys +import traceback from traitlets.config import LoggingConfigurable @@ -339,6 +341,7 @@ def load_extension(self, name, serverapp): extension.load_all_points(serverapp) self.log.info("{name} | extension was successfully loaded.".format(name=name)) except Exception as e: + self.log.debug("".join(traceback.format_exception(*sys.exc_info()))) self.log.warning("{name} | extension failed loading with message: {error}".format(name=name,error=str(e))) def link_all_extensions(self, serverapp):