Skip to content

Commit 750ff3f

Browse files
committed
Include date in log statements
Notebook overrides the logger date format to not include the date in log entries and, as a result, Server followed suit. Since we expect Server to run multiple days on end, and the log will typically be redirected, etc., we should use the default date format - which includes the date. As a result, entries will look like the following... [D 2020-01-13 15:52:01.768 ServerApp] Looking for jupyter_config in /etc/jupyter
1 parent 802916b commit 750ff3f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

jupyter_server/serverapp.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -596,14 +596,9 @@ class ServerApp(JupyterApp):
596596
def _default_log_level(self):
597597
return logging.INFO
598598

599-
@default('log_datefmt')
600-
def _default_log_datefmt(self):
601-
"""Exclude date from default date format"""
602-
return "%H:%M:%S"
603-
604599
@default('log_format')
605600
def _default_log_format(self):
606-
"""override default log format to include time"""
601+
"""override default log format to include date & time"""
607602
return u"%(color)s[%(levelname)1.1s %(asctime)s.%(msecs).03d %(name)s]%(end_color)s %(message)s"
608603

609604
# file to be opened in the Jupyter server

0 commit comments

Comments
 (0)