def _init_logger(debug=False, log_format=None):
    logger.handlers = []
    log_level = logging.INFO
    if debug:
        log_level = logging.DEBUG

    if not log_format:
        # default log format
        log_format_string = constants.log_format_string
    else:
        log_format_string = log_format

    logging.captureWarnings(True)

    logger.setLevel(log_level)
    handler = logging.StreamHandler(sys.stderr)
    handler.setFormatter(logging.Formatter(log_format_string))
    logger.addHandler(handler)
    logger.debug("logging initialized")
Build a set of all Matplotlib artists in a Figure
dataset/ETHPy150Open openstack/bandit/bandit/cli/main.py/_init_logger--crossover with--dataset/ETHPy150Open glue-viz/glue/glue/utils/matplotlib.py/all_artists