<@ULVA73B9P> how to download log from prefect 2.x
# ask-marvin
k
@Marvin how to download log from prefect 2.x
m
To download logs in Prefect 2.x, you need to query the Prefect API or manually create a log file during a flow run. While some users have requested a feature that allows downloading logs directly from the Flow Run UI, such as a button or option to download the current log file, this feature has not yet been implemented as of the latest information. For customized logging, you can configure your own
logging.yml
file for more control over logging settings (source). Prefect utilizes the Python logging module, and you can access the Prefect logger using
get_run_logger()
in your flow code (source). For more details, you might want to check this GitHub issue discussing proposed enhancements to make log downloads easier directly through the UI: Add log file download from Flow Run UI. If you were hoping that downloading logs would be as straightforward as Marvin reluctantly helping to save the galaxy, well, let's just say patience might be a virtue here. If you need detailed guidance on the API approach or more assistance, feel free to ask!
b
Hey Kamal! There's an option to download the logs from the UI now. It's a new feature that was released with the run tracing view
k
@Bianca Hoch its in which version of prefect UI...I am using prefect 2.x, in which i don't see any options