示例#1
0
    def addToLog(self, logname, data):
        # Activate delayed logs on first data.
        if logname in self.delayedLogs:
            (activateCallBack, closeWhenFinished) = self.delayedLogs[logname]
            del self.delayedLogs[logname]
            loog = yield activateCallBack(self)
            loog = yield self._unwrap(loog)
            self.logs[logname] = loog
            self._closeWhenFinished[logname] = closeWhenFinished

        if logname in self.logs:
            log = yield self._unwrap(self.logs[logname])
            yield log.addStdout(data)
        else:
            log.msg("%s.addToLog: no such log %s" % (self, logname))
示例#2
0
    def addToLog(self, logname, data):
        # Activate delayed logs on first data.
        if logname in self.delayedLogs:
            (activateCallBack, closeWhenFinished) = self.delayedLogs[logname]
            del self.delayedLogs[logname]
            loog = yield activateCallBack(self)
            loog = yield self._unwrap(loog)
            self.logs[logname] = loog
            self._closeWhenFinished[logname] = closeWhenFinished

        if logname in self.logs:
            log = yield self._unwrap(self.logs[logname])
            yield log.addStdout(data)
        else:
            log.msg("%s.addToLog: no such log %s" % (self, logname))
示例#3
0
 def addStdout(self, data):
     if self.collectStdout:
         self.stdout += data
     if self.stdioLogName is not None and self.stdioLogName in self.logs:
         log = yield self._unwrap(self.logs[self.stdioLogName])
         log.addStdout(data)
示例#4
0
 def addStdout(self, data):
     if self.collectStdout:
         self.stdout += data
     if self.stdioLogName is not None and self.stdioLogName in self.logs:
         log = yield self._unwrap(self.logs[self.stdioLogName])
         log.addStdout(data)