Jacob Metcalf
05/14/2024, 9:46 PMlog_stdout=True
? This was something used for tasks in Prefect 1.0Marvin
05/14/2024, 9:46 PMlog_stdout
parameter that was used in Prefect 1.0. Instead, you can customize the logging configuration in various ways to achieve similar outcomes.
The default settings already log events for flow runs and task runs, and you can view and filter these logs in the Prefect UI or Prefect Cloud. If you require more detailed logs, such as capturing stdout
, you may need to adjust the root logger's level or configure specific log handlers in your environment.
To alter the default logging levels for Prefect, you can set environment variables such as PREFECT_LOGGING_LEVEL="DEBUG"
for Prefect-specific logs, or override the configuration for the "root" Python logger, which receives logs from all loggers, through variables like PREFECT_LOGGING_ROOT_LEVEL
.
To view details on how to customize logging further, please refer to the Prefect Logging Documentation. This documentation covers a higher-level overview of logging in Prefect 2.0, which can be used as a basis to configure the system to route logs from stdout
as needed.