From d7b70e7b63968907d580e5698367d615530ccf13 Mon Sep 17 00:00:00 2001 From: Zsailer Date: Thu, 15 Aug 2019 15:50:54 -0700 Subject: [PATCH] add logging messages --- jupyter_server/extension/application.py | 12 +++++++++++- jupyter_server/serverapp.py | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/jupyter_server/extension/application.py b/jupyter_server/extension/application.py index 266984219f..3473c40168 100644 --- a/jupyter_server/extension/application.py +++ b/jupyter_server/extension/application.py @@ -318,7 +318,17 @@ def launch_instance(cls, argv=None, **kwargs): else: args = [] # Get a jupyter server instance. - serverapp = cls.initialize_server(argv=args, load_other_extensions=cls.load_other_extensions) + serverapp = cls.initialize_server( + argv=args, + load_other_extensions=cls.load_other_extensions + ) + # Log if extension is blocking other extensions from loading. + if cls.load_other_extensions: + serverapp.log.info( + "{ext_name} is running without loading " + "other extensions.".format(ext_name=cls.extension_name) + ) + extension = cls._prepare_launch(serverapp, argv=args, **kwargs) # Start the ioloop. extension.start_server() diff --git a/jupyter_server/serverapp.py b/jupyter_server/serverapp.py index b151044f82..a3fefabfd7 100755 --- a/jupyter_server/serverapp.py +++ b/jupyter_server/serverapp.py @@ -1415,6 +1415,8 @@ def init_server_extensions(self): func = getattr(mod, 'load_jupyter_server_extension', None) if func is not None: func(self) + # Add debug log for loaded extensions. + self.log.debug("%s is enabled and loaded." % modulename) except Exception: if self.reraise_server_extension_failures: raise