def METHOD_NAME(log_file_type: str, log):
    assert bool(
        re.search(
            rf"Error logging the message 'XXX' to the {log_file_type} file handle for .* at "
            rf"pid {os.getpid()}",
            log.msg,
        )
    )
    assert log.filename == "exception_sink.py"