def emit(self, record):
        try:
            if getattr(record, 'append', False):
                if self.appending:
                    self.stream.write(record.getMessage())
                else:
                    self.stream.write(self.format(record))
                self.appending = True
            else:
                terminator = getattr(self, 'terminator', '\n')
                if self.appending:
                    self.stream.write(terminator)
                self.stream.write(self.format(record))
                self.stream.write(terminator)
                self.appending = False
            self.flush()
        except (__HOLE__, SystemExit):
            raise
        except Exception:
            self.handleError(record)
dataset/ETHPy150Open boto/requestbuilder/requestbuilder/logging.py/ProgressiveStreamHandler.emit