def METHOD_NAME(caplog):
    def run(app, level=logging.DEBUG):
        @app.after_server_start
        async def stop(app, _):
            app.stop()
        with caplog.at_level(level):
            Sanic.serve()
        return caplog.record_tuples
    return run