from typing import Callable


def log_exception(exc: Exception, logger: Callable[[str], None], status: int) -> int:
    """Log the exception and exit with `status`."""
    logger(str(exc))
    return status