def init_logger(name, config=True, captureWarnings=True, raiseExceptions=False):
    """Load (or not) a logging configuration and create the logger

    Parameters
    ----------
    name (None, str) :
        Name used to identify the logger
        Same name used by `logging.getLogger(name=None)`
    config, captureWarnings, raiseExceptions : see load_config
    """

    if config:
        load_config(config, captureWarnings, raiseExceptions)

    return logging.getLogger(name)


def load_config(config=None, captureWarnings=True, raiseExceptions=False):
    """Load logging configuration from user or default configuration

    Parameters
    ----------
    config (True, dict, PathLike) :
        Whole configuration to load for the logging module
        If config is True or False-like, DEFAULT_CONFIG will be loaded
    captureWarnings (bool) :
        Capture (or not) the warnings and delegate to the 'py.warnings' logger
    raiseExceptions (bool) :
        Should be true for development, false in production
    """

    if config is True or not config:
        config = DEFAULT_CONFIG

    # config can be loaded from files handled by pyzzy.data
    if config and is_file(config):
        config = load(config)
    logging.config.dictConfig(config)

    logging.captureWarnings(captureWarnings)

    logging.raiseExceptions = raiseExceptions