<@ULVA73B9P> Is there a way to search through logs...
# ask-marvin
m
@Marvin Is there a way to search through logs like there was in Prefect 1? It doesn't really work to use the Browser search cuz the logs load bit by bit.
m
In Prefect 2.x, logs are captured for flow and task runs by default. You don't need to start a Prefect server to view logs, as they are captured automatically. To search through logs, you can use the Prefect UI or Prefect Cloud. The logs can be viewed and filtered within these platforms, allowing you to monitor, troubleshoot, and audit your workflows effectively. Unfortunately, there isn't a direct mention in the documentation snippet about a specific log searching feature within the Prefect UI that handles the incremental loading of logs. However, based on what you have mentioned about the browser search not being effective due to logs loading bit by bit, it sounds like the Prefect UI might not have a built-in search as robust as what was available in Prefect 1.x if they present similar loading behaviors. For direct log searching and handling large volumes of log data, accessing log records via the API and using external tools or scripts might be a workaround. You could script log retrieval and searching if the in-built UI capabilities do not meet your requirements. This approach allows for more control and could bypass UI limitations related to log loading. For more detailed information and guidance, you might want to check the official Prefect 2.x documentation or reach out to Prefect support or the community forum for specific advice on best practices for log searching in the latest version. Here is the link to the logging guide in Prefect 2.x documentation: Prefect 2.x Logging Guide.
j
afaik you can only use the filter to filter on log level, but no log searching, that would be awesome feature though imo
👍 1
m
It was awesome in Prefect 1 too!
🚀 1
yess 1