def remove_file_handler(id_: str) -> None:
    """Remove a file handler by its id."""
    handler = _ADDITIONAL_HANDLERS.pop(id_)
    with _LOG_LOCK:
        # Lock because other thread might be modifying the _SET_UP_LOGGERS set
        for log_name in _SET_UP_LOGGERS:
            logger = logging.getLogger(log_name)
            logger.removeHandler(handler)
Remove a file handler by its id.
sweagent/utils/log.py