import logging


def resolve_level_string(value):
    """Resolve the log level of a string."""
    try:
        # Handle already int values
        value = int(value)
        return value
    except ValueError:
        return getattr(logging, value)