<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, s):
 """Write message to logger."""

        for line in re.split(r'\n+', s):
            if line != '':
                self._logger.log(self._level, line)