<@ULVA73B9P> if I check my flow run logs I often s...
# ask-marvin
g
@Marvin if I check my flow run logs I often see something like
3 items hidden (3 task runs)
, where task runs are hidden. THis is preventing me from see what's happening with my flow run. how can I prevent this?
m
thought for 46.4 seconds
Based on the research, I can help you with controlling the visibility of task run logs. In Prefect 3.x, there are a few ways to handle this: 1. Using Environment Variables: You can set the
PREFECT_LOGGING_LEVEL
environment variable to a more verbose level. For example:
Copy code
bash
   export PREFECT_LOGGING_LEVEL="DEBUG"
2. Customizing Logging Configuration: You can modify the logging configuration by creating or editing
~/.prefect/logging.yml
. This allows for more granular control over log visibility. 3. Adding Extra Loggers: If you need to capture logs from specific libraries or components, you can use the
PREFECT_LOGGING_EXTRA_LOGGERS
environment variable:
Copy code
bash
   export PREFECT_LOGGING_EXTRA_LOGGERS="['your_package_name']"
4. View Complete Logs in UI: If you're using Prefect Cloud or Server, you can click on individual task runs in the UI to see their complete logs, even if they're condensed in the main flow run view. The message you're seeing (
3 items hidden (3 task runs)
) is typically shown to keep the log output clean and manageable, especially when there are many task runs. However, the full information is still available and can be accessed through the methods above. For the most comprehensive solution, I recommend: 1. First try setting
PREFECT_LOGGING_LEVEL="DEBUG"
2. If you need more control, create a custom logging configuration in
~/.prefect/logging.yml
You can find more detailed information about logging customization in the Prefect documentation. Would you like me to provide more specific details about any of these approaches, particularly about creating a custom logging configuration?
j
@Gio Do you mean in the GUI? Look at the filter and display menus above the log window. Turn off all the filters and turn on all the things to display and you'll get everything that's available.