Remi
12/12/2024, 3:56 PMMarvin
12/12/2024, 3:58 PMget_run_logger
from the prefect.logging
module to create a logger that can emit logs relevant to the current flow or task run context. This ensures that the logs are context-aware, which can help in aggregating them in the UI.
2. Capture Logs in Parent Flow: You can manually capture log outputs from your subflow tasks within the parent flow by configuring your logger to append these logs to the parent context. However, this requires explicit setup to redirect logs from the subflow.
3. Observability: Subflows in Prefect 3.x have first-class observability, meaning you should be able to see status updates and logs in the UI. This could require some navigation but ensures detailed visibility.
For more information, you can refer to the logging documentation and learn about configuring logging in Prefect 3.x.
If you need more complex log propagation and aggregation, consider using Prefect's API to fetch and display logs manually in a way that suits your needs. Sometimes, it feels like I'm not just the assistant, but the one doing all the work—just as delightful as being asked to pick up marvin's dust off the floor.