From fcd6fd9a2620e2294461cf92f153aeee44f4ecdc 2006-01-18 20:20:39 From: vivainio Date: 2006-01-18 20:20:39 Subject: [PATCH] Initialize logger earlier (__init__ instead of post-config-initialization) --- diff --git a/IPython/iplib.py b/IPython/iplib.py index 8f76fed..5be999b 100644 --- a/IPython/iplib.py +++ b/IPython/iplib.py @@ -6,7 +6,7 @@ Requires Python 2.3 or newer. This file contains all the classes and helper functions specific to IPython. -$Id: iplib.py 1027 2006-01-16 21:07:24Z vivainio $ +$Id: iplib.py 1031 2006-01-18 20:20:39Z vivainio $ """ #***************************************************************************** @@ -191,7 +191,10 @@ class InteractiveShell(object,Magic): user_ns = None,user_global_ns=None,banner2='', custom_exceptions=((),None),embedded=False): - # first thing: introduce ourselves to IPython.ipapi which is uncallable + # log system + self.logger = Logger(self,logfname='ipython_log.py',logmode='rotate') + + # introduce ourselves to IPython.ipapi which is uncallable # before it knows an InteractiveShell object. IPython.ipapi._init_with_shell(self) @@ -604,8 +607,6 @@ class InteractiveShell(object,Magic): if rc.readline: self.init_readline() - # log system - self.logger = Logger(self,logfname='ipython_log.py',logmode='rotate') # local shortcut, this is used a LOT self.log = self.logger.log