def get_logger_for_python_runner_action(action_name):
    logger_name = 'actions.python.%s' % (action_name)
    logger = logging.getLogger(logger_name)

    console = stdlib_logging.StreamHandler()
    console.setLevel(stdlib_logging.DEBUG)

    formatter = stdlib_logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s')
    console.setFormatter(formatter)
    logger.addHandler(console)
    logger.setLevel(stdlib_logging.DEBUG)

    return logger
Set up a logger which logs all the messages with level DEBUG and above to stderr.
dataset/ETHPy150Open StackStorm/st2/st2actions/st2actions/runners/utils.py/get_logger_for_python_runner_action