mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-30 12:11:32 +08:00
use highlevel in notebook log format
datefmt no longer necessary
This commit is contained in:
parent
19c6442a7d
commit
9b22138a9b
@ -324,7 +324,7 @@ class NotebookApp(BaseIPythonApplication):
|
||||
|
||||
def _log_format_default(self):
|
||||
"""override default log format to include time"""
|
||||
return u"%(asctime)s.%(msecs).03d [%(name)s] %(message)s"
|
||||
return u"%(asctime)s.%(msecs).03d [%(name)s]%(highlevel)s %(message)s"
|
||||
|
||||
# create requested profiles by default, if they don't exist:
|
||||
auto_create = Bool(True)
|
||||
@ -538,10 +538,6 @@ class NotebookApp(BaseIPythonApplication):
|
||||
# and all of its ancenstors until propagate is set to False.
|
||||
self.log.propagate = False
|
||||
|
||||
# set the date format
|
||||
formatter = logging.Formatter(self.log_format, datefmt="%Y-%m-%d %H:%M:%S")
|
||||
self.log.handlers[0].setFormatter(formatter)
|
||||
|
||||
# hook up tornado 3's loggers to our app handlers
|
||||
for name in ('access', 'application', 'general'):
|
||||
logging.getLogger('tornado.%s' % name).handlers = self.log.handlers
|
||||
|
Loading…
Reference in New Issue
Block a user