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 )
how to store the output of curl command in python using logger
Send the cmd info and collected stdout to logger .
def dump_to_log(self, logger):
        """Send the cmd info and collected stdout to 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)