diff --git a/IPython/frontend/html/notebook/notebookapp.py b/IPython/frontend/html/notebook/notebookapp.py
index 9ff3abb..14d2617 100644
--- a/IPython/frontend/html/notebook/notebookapp.py
+++ b/IPython/frontend/html/notebook/notebookapp.py
@@ -484,7 +484,6 @@ class NotebookApp(BaseIPythonApplication):
)
kls = import_item(self.notebook_manager_class)
self.notebook_manager = kls(config=self.config, log=self.log)
- self.notebook_manager.log_info()
self.notebook_manager.load_notebook_names()
self.cluster_manager = ClusterManager(config=self.config, log=self.log)
self.cluster_manager.update_profiles()
@@ -576,7 +575,10 @@ class NotebookApp(BaseIPythonApplication):
"""
# FIXME: remove this delay when pyzmq dependency is >= 2.1.11
time.sleep(0.1)
- sys.stdout.write("Shutdown Notebook Server at %s (y/[n])? " % self._url)
+ info = self.log.info
+ info('interrupted')
+ self.print_notebook_info()
+ info("Shutdown this notebook server (y/[n])? ")
sys.stdout.flush()
r,w,x = select.select([sys.stdin], [], [], 5)
if r:
@@ -615,6 +617,11 @@ class NotebookApp(BaseIPythonApplication):
self.log.info('Shutting down kernels')
self.kernel_manager.shutdown_all()
+ def print_notebook_info(self):
+ "Print the current working directory and the server url information"
+ self.notebook_manager.log_info()
+ self.log.info("The IPython Notebook is running at: %s" % self._url)
+
def start(self):
""" Start the IPython Notebok server app, after initialization
@@ -625,7 +632,7 @@ class NotebookApp(BaseIPythonApplication):
info = self.log.info
self._url = "%s://%s:%i%s" % (proto, ip, self.port,
self.base_project_url)
- info("The IPython Notebook is running at: %s" % self._url)
+ self.print_notebook_info()
info("Use Control-C to stop this server and shut down all kernels.")
if self.open_browser or self.file_to_run: