Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions notebook/base/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@

sys_info = json.dumps(get_sys_info())

def log():
if Application.initialized():
return Application.instance().log
else:
return app_log

class AuthenticatedHandler(web.RequestHandler):
"""A RequestHandler with an authenticated user."""

Expand Down Expand Up @@ -141,10 +147,7 @@ def config(self):
@property
def log(self):
"""use the IPython log by default, falling back on tornado's logger"""
if Application.initialized():
return Application.instance().log
else:
return app_log
return log()

@property
def jinja_template_vars(self):
Expand Down Expand Up @@ -538,6 +541,9 @@ def get_absolute_path(cls, roots, path):
return ''

cls._static_paths[path] = abspath


log().debug("Path %s served from %s"%(path, abspath))
return abspath

def validate_absolute_path(self, root, absolute_path):
Expand Down