##// END OF EJS Templates
BUG Move setting of log_active flag down...
Luis Pedro Coelho -
Show More
@@ -69,8 +69,6 b' class Logger(object):'
69 raise RuntimeError('Log file is already active: %s' %
69 raise RuntimeError('Log file is already active: %s' %
70 self.logfname)
70 self.logfname)
71
71
72 self.log_active = True
73
74 # The parameters can override constructor defaults
72 # The parameters can override constructor defaults
75 if logfname is not None: self.logfname = logfname
73 if logfname is not None: self.logfname = logfname
76 if loghead is not None: self.loghead = loghead
74 if loghead is not None: self.loghead = loghead
@@ -124,6 +122,7 b' class Logger(object):'
124 self.logfile.write(self.loghead)
122 self.logfile.write(self.loghead)
125
123
126 self.logfile.flush()
124 self.logfile.flush()
125 self.log_active = True
127
126
128 def switch_log(self,val):
127 def switch_log(self,val):
129 """Switch logging on/off. val should be ONLY a boolean."""
128 """Switch logging on/off. val should be ONLY a boolean."""
General Comments 0
You need to be logged in to leave comments. Login now