@@ -517,10 +517,19 @@ def start(self):
517
517
_ ("Allow the server to be run from root user." )
518
518
)
519
519
flags ["no-browser" ] = (
520
- {"ServerApp" : {"open_browser" : False }},
520
+ {
521
+ "ServerApp" : {"open_browser" : False },
522
+ "ExtensionApp" : {"open_browser" : False }
523
+ },
521
524
_ ("Prevent the opening of the default url in the browser." ),
522
525
)
523
-
526
+ flags ["debug" ] = (
527
+ {
528
+ 'ServerApp' : {'log_level' : 'DEBUG' },
529
+ 'ExtensionApp' : {'log_level' : 'DEBUG' }
530
+ },
531
+ _ ("Set debug level for the extension and underlying server applications." )
532
+ )
524
533
# Add notebook manager flags
525
534
flags .update (boolean_flag ('script' , 'FileContentsManager.save_script' ,
526
535
'DEPRECATED, IGNORED' ,
@@ -937,23 +946,20 @@ def _default_allow_remote(self):
937
946
# It is sometimes important to know if + which another app (say a server extension)
938
947
# started the serverapp to properly configure some traits.
939
948
# This trait should not be configured by users. It will likely be set by ExtensionApp.
940
- _starter_app_name = Unicode ( None , allow_none = True )
949
+ _starter_app = Instance ( JupyterApp , allow_none = True )
941
950
942
- @validate ('_starter_app_name ' )
951
+ @validate ('_starter_app ' )
943
952
def _validate_starter_app (self , proposal ):
944
953
# Check that a previous server extension isn't named yet
945
954
value = proposal ["value" ]
946
- if self ._starter_app_name != None :
955
+ if self ._starter_app != None :
947
956
raise TraitError ("Another extension was already named as the starter_server_extension." )
948
957
return value
949
958
950
959
@property
951
960
def starter_app (self ):
952
961
"""Get the Extension that started this server."""
953
- name = self ._starter_app_name
954
- if name is None :
955
- return
956
- return self .extension_manager .extension_points .get (name , None ).app
962
+ return self ._starter_app
957
963
958
964
open_browser = Bool (False , config = True ,
959
965
help = """Whether to open in a browser after starting.
0 commit comments