import logging


def get_numeric_level(level: str) -> int:
    """Converts the given log level name to the appropriate number.

    Parameters
    ----------
    level : str
        The name of the logging level to get the associated ``int`` for
        (case-insensitive).

    Returns
    -------
    int
        The ``logging`` module's log level (``int``) associated with the
        given `level`.

    Raises
    ------
    ValueError
        If the given `level` is not a valid logging level.

    """
    try:
        return getattr(logging, level.upper())
    except AttributeError:
        raise ValueError(f"No such logging level: {level.upper()}")