use highlevel in notebook log format

datefmt no longer necessary
This commit is contained in:
MinRK 2013-05-03 17:04:32 -07:00
parent 19c6442a7d
commit 9b22138a9b

View File

@ -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