move default log setup to _log_default from init_logging

allows classes to be passed log attribute, avoiding duplicate setup and occasional errors if things are done in the wrong order.
MinRK 14 years ago
parent e0cdb267de
commit b037cf18a4

@ -45,8 +45,6 @@ class DummyIPClusterStart(IPClusterStart):
def init_signal(self):
pass
def init_logging(self):
pass
def reinit_logging(self):
pass

@ -390,7 +390,6 @@ class NotebookApp(BaseIPythonApplication):
self.cluster_manager.update_profiles()
def init_logging(self):
super(NotebookApp, self).init_logging()
# This prevents double log messages because tornado use a root logger that
# self.log is a child of. The logging module dipatches log messages to a log
# and all of its ancenstors until propagate is set to False.
@ -493,6 +492,7 @@ class NotebookApp(BaseIPythonApplication):
@catch_config_error
def initialize(self, argv=None):
self.init_logging()
super(NotebookApp, self).initialize(argv)
self.init_configurables()
self.init_webapp()

Loading…
Cancel
Save