Lines Matching full:log

99   '''This class creates a shared log and provides methods for writing to it'''
103 …def __init__(self, clArgs = None, argDB = None, log = None, out = defaultOut, debugLevel = None, d… argument
106 self.log = log
115 '''We do not want to pickle the default log stream'''
119 if 'log' in d:
120 if d['log'] is Logger.defaultLog:
121 del d['log']
123 d['log'] = None
132 '''We must create the default log stream'''
134 if not 'log' in d:
135 self.log = self.createLog(None)
146 argDB.setType('log', nargs.Arg(None, 'buildsystem.log', 'The filename for the log'))
147 …l(None, 0, 'The flag determining whether we backup or append to the current log', isTemporary = 1))
150 argDB.setType('debugIndent', nargs.Arg(None, ' ', 'The string used for log indentation'))
157 self.log = self.createLog(self.logName, self.log)
175 logName = nargs.Arg.findArgument('log', self.clArgs)
177 if not self.argDB is None and 'log' in self.argDB:
178 logName = self.argDB['log']
180 logName = 'default.log'
186 '''Create a default log stream, unless initLog is given'''
190 log = initLog
204 sys.stdout.write('WARNING: Cannot backup log file, appending instead.\n')
208 log = Logger.defaultLog
209 return log
212 '''Closes the log file'''
213 self.log.close()
218 self.logBkp = self.log
219 self.log = io.StringIO()
223 s = self.log.getvalue()
224 self.log.close()
225 self.log = self.logBkp
254 …linewidth = property(getLinewidth, setLinewidth, doc = 'The maximum number of characters per log l…
257 '''Check whether the log line should be written
298 '''Write the proper indentation to the log streams'''
302 for writeAll, f in enumerate([self.out, self.log]):
369 '''Write the message to the log streams'''
372 for writeAll, f in enumerate([self.out, self.log]):
396 '''Write the message to the log streams with proper indentation and a newline'''
401 for writeAll, f in enumerate([self.out, self.log]):