The hierarchy for Jinja templating in Prefect resources and the specific reference for accessing logs of a flow run using Jinja are not explicitly stated in the provided documentation. However, from what is available, it is clear that Prefect automatically captures logs for flow and task runs and provides the capability to view and filter these logs in the Prefect UI or Prefect Cloud, as well as access them via the API.
To access the logs of a flow run using Jinja in Prefect 2.x, you would typically utilize the capabilities of Prefect's logging feature. Prefect's logging system automatically logs events for flow runs and task runs. Although specific Jinja placeholders for logs are not provided in the excerpts, logs can be custom formatted and configured, indicating there are ways to interact with these logs programmatically.
For a comprehensive reference, you can refer to the official Prefect documentation or API. Details on how to use Jinja with Prefect's logs might be found in the documentation section on
logging or in the guide for templating with Prefect.
If you need more specific guidance, I recommend checking the complete Prefect 2.x documentation or reaching out to Prefect's support for detailed instructions on using Jinja templating to refer to logs within the context of the Prefect resource hierarchy.