def addLog(self, name): assert self.started # addLog before stepStarted won't notify watchers logfilename = self.build.generateLogfileName(self.name, name) log = LogFile(self, name, logfilename) self.logs.append(log) for w in self.watchers: receiver = w.logStarted(self.build, self, log) if receiver: log.subscribe(receiver, True) d = log.waitUntilFinished() d.addCallback(lambda log: log.unsubscribe(receiver)) d = log.waitUntilFinished() d.addCallback(self.logFinished) return log
def addLog(self, name): assert self.started # addLog before stepStarted won't notify watchers build = self.getBuild() logfilename = build.generateLogfileName(self.name, name) log = LogFile(self, name, logfilename) log.logMaxSize = self.builder.logMaxSize log.logMaxTailSize = self.builder.logMaxTailSize log.compressMethod = self.builder.logCompressionMethod self.logs.append(log) for w in self.watchers: receiver = w.logStarted(build, self, log) if receiver: log.subscribe(receiver, True) d = log.waitUntilFinished() d.addCallback(lambda log: log.unsubscribe(receiver)) d = log.waitUntilFinished() d.addCallback(self.logFinished) return log