code: def write(self, msg, level=logging.INFO):
          
          if msg is not None and len(msg.strip()) > 0:
              self.logger.log(level, msg)
docs: method implements stream write interface, allowing to redirect stdout to logger