<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write(self, msg, level=logging.INFO):
 """ method implements stream write interface, allowing to redirect stdout to logger """

        if msg is not None and len(msg.strip()) > 0:
            self.logger.log(level, msg)