<@ULVA73B9P> any way to auto refresh run logs on s...
# ask-marvin
v
@Marvin any way to auto refresh run logs on self hosted prefect?
m
To auto-refresh run logs on a self-hosted Prefect server, there isn't a direct feature that automatically refreshes logs in real-time. However, you can configure the logging settings to ensure that logs are captured and viewable as expected. Here are some considerations and steps: 1. Log Configuration: Ensure your Prefect server and agents are configured correctly to capture logs. This includes setting up the logging level and handlers. 2. UI Log Sorting: By default, logs in the Prefect UI are sorted "Oldest to Newest." While there isn't an automatic refresh, you can manually refresh the page or adjust the sort order to "Newest to Oldest" for easier viewing of recent logs. GitHub Issue on Log Sorting 3. Cache Refresh: If you want to ensure tasks always log fresh data instead of cached results, you can set
PREFECT_TASKS_REFRESH_CACHE=true
in your environment settings. This forces tasks to refresh their cache and rerun, ensuring new logs are generated. Prefect Cache Settings 4. Manual Refresh: While not automatic, you can use browser extensions or scripts to refresh the Prefect UI page at regular intervals. For more detailed configuration, you might want to explore the self-hosting guide for Prefect. If there are specific logging issues, reviewing the Prefect logging documentation might also be helpful. If you encounter issues where logs are not propagating as expected, it might be worth checking existing GitHub issues for potential bugs or workarounds.