mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-30 12:11:32 +08:00
Merge pull request #1939 from jupyter/static-file-log
Add debug log for static file paths
This commit is contained in:
commit
38060d001e
@ -40,6 +40,12 @@ non_alphanum = re.compile(r'[^A-Za-z0-9]')
|
||||
|
||||
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."""
|
||||
|
||||
@ -151,10 +157,7 @@ class IPythonHandler(AuthenticatedHandler):
|
||||
@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):
|
||||
@ -550,6 +553,9 @@ class FileFindHandler(IPythonHandler, web.StaticFileHandler):
|
||||
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):
|
||||
|
Loading…
Reference in New Issue
Block a user