def loglevel_from_str(log_level_str):
    log_level_str = log_level_str.upper()
    numeric_level = getattr(logging, log_level_str, None)

    if not isinstance(numeric_level, int):
        raise ValueError('Invalid log level: %s' % log_level_str)

    return numeric_level
dataset/ETHPy150Open oleiade/Elevator/elevator/log.py/loglevel_from_str/original