Further highlight token info in log output

add critical-level log statement at the end of startup with token info
This commit is contained in:
Min RK 2016-12-19 15:02:36 +01:00
parent 0c5613b13a
commit faf60320dd

View File

@ -1321,7 +1321,15 @@ class NotebookApp(JupyterApp):
b = lambda : browser.open(url_path_join(self.connection_url, uri),
new=2)
threading.Thread(target=b).start()
if self.token:
self.log.critical('\n'.join([
'\n',
'Copy/paste this URL into your browser when you connect for the first time,',
'to login with a token:',
' %s' % url_concat(self.connection_url, {'token': self.token}),
]))
self.io_loop = ioloop.IOLoop.current()
if sys.platform.startswith('win'):
# add no-op to wake every 5s