code: def dump_to_log(self, logger):
          
          logger.error("Execution ended in %s for cmd %s", self._retcode, self._cmd)
          for line in self._collected_stdout:
              logger.error(STDOUT_LOG_PREFIX + line)
docs: Send the cmd info and collected stdout to logger.