code: def write(self, buf):
          '''
          Write buffer data into logger/stdout
          '''
          for line in buf.rstrip().splitlines():
              self.orig_stdout.write(line.rstrip() + '\n')
              self.orig_stdout.flush()
              try:
                  self.logger.log(self.log_level, line.rstrip())
              except Exception as e:
                  pasf write(self, buf):
          '''
          Write buffer data into logger/stdout
          '''
          for line in buf.rstrip().splitlines():
              self.orig_stdout.write(line.rstrip() + '\n')
              self.orig_stdout.flush()
              try:
                  self.logger.log(self.log_level, line.rstrip())
              except Exception as e:
                  pass
docs: Write buffer data into logger/stdout