https://prefect.io logo
Title
r

Robert Esteves

03/28/2023, 4:09 PM
Hi All, Is there a way to export a Flow's log to a CSV or JSON file?
d

Dominic Tarro

03/28/2023, 9:27 PM
The logs are stored as the strings you see. If you want to get those from a run and parse them yourself,
prefect flow-run logs <flow run id>
. If not, you could look into overriding Prefect's log formatter with something like python-json-logger. If you want all logs for all runs of a flow you'll have to look into the
prefect.server
library to try and query them.