From b037cf18a40324e56b4966c36732be381e2785ed Mon Sep 17 00:00:00 2001 From: MinRK Date: Tue, 22 May 2012 10:52:26 -0700 Subject: [PATCH] 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. --- IPython/frontend/html/notebook/clustermanager.py | 2 -- IPython/frontend/html/notebook/notebookapp.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/IPython/frontend/html/notebook/clustermanager.py b/IPython/frontend/html/notebook/clustermanager.py index 27e1e9bb8..7e4f42833 100644 --- a/IPython/frontend/html/notebook/clustermanager.py +++ b/IPython/frontend/html/notebook/clustermanager.py @@ -45,8 +45,6 @@ class DummyIPClusterStart(IPClusterStart): def init_signal(self): pass - def init_logging(self): - pass def reinit_logging(self): pass diff --git a/IPython/frontend/html/notebook/notebookapp.py b/IPython/frontend/html/notebook/notebookapp.py index b157c97ff..22dbf2083 100644 --- a/IPython/frontend/html/notebook/notebookapp.py +++ b/IPython/frontend/html/notebook/notebookapp.py @@ -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()