<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stdout_cm(self):
 """ Redirect the stdout to a log file. """

        with open(self._get_stdout_log(), 'a+') as fh:
            msg = '### {} ###\n'.format(self._datetime)
            fh.write(msg)
            fh.flush()

            yield fh