import logging


def get_lower_level(l0, l1):
    """Compare logging levels and return the lower level."""
    if isinstance(l0, (str)):
        l0 = logging.getLevelName(l0)
    if isinstance(l1, (str)):
        l1 = logging.getLevelName(l1)

    return l0 if l0 < l1 else l1