mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 14:03:02 +00:00
more info in log prefix
- include date, in addition to time - show module:line - put username in single-user log prefix It's more information, making the log prefix pretty long now, but I think it makes sense, given the number of log sources and likely duration of a JupyterHub instance.
This commit is contained in:
@@ -338,11 +338,11 @@ class JupyterHub(Application):
|
||||
|
||||
def _log_datefmt_default(self):
|
||||
"""Exclude date from default date format"""
|
||||
return "%H:%M:%S"
|
||||
return "%Y-%m-%d %H:%M:%S"
|
||||
|
||||
def _log_format_default(self):
|
||||
"""override default log format to include time"""
|
||||
return "%(color)s[%(levelname)1.1s %(asctime)s.%(msecs).03d %(name)s]%(end_color)s %(message)s"
|
||||
return "%(color)s[%(levelname)1.1s %(asctime)s.%(msecs).03d %(name)s %(module)s:%(lineno)d]%(end_color)s %(message)s"
|
||||
|
||||
def init_logging(self):
|
||||
# This prevents double log messages because tornado use a root logger that
|
||||
|
Reference in New Issue
Block a user