<@ULVA73B9P> In prefect v1, when self hosting, flo...
# ask-marvin
k
@Marvin In prefect v1, when self hosting, flow run logs were saved in the database. Is this still the case for v3? Is it configurable?
m
In Prefect 3.x, unlike Prefect 1.x, logs are not saved in a database by default when using self-hosting. Prefect 3.x provides flexible logging configurations that allow logs to be emitted during flow and task runs. These logs can be inspected via the Prefect UI, CLI, or API, and Prefect uses standard loggers that are configured automatically every time you execute a flow or task. Prefect allows you to use
get_run_logger()
to create logs that are tied to the flow or task context, making it easier to track and manage logs based on the run context. However, these are not stored in a centralized database by default when self-hosting. This design provides flexibility and aims to integrate smoothly with existing monitoring solutions you might have in place. More detailed information about logging in Prefect 3.x can be found in their documentation here: Prefect 3.x Logging. If you choose to implement a self-hosted logging solution, you can potentially store logs in a database using custom log handlers or external systems like Elasticsearch, Splunk, or a traditional RDBMS system using Python logging configurations.