Matt Alhonte
09/30/2024, 10:55 PMPREFECT_LOGGING_EXTRA_LOGGERS
?Marvin
09/30/2024, 10:55 PMPREFECT_LOGGING_EXTRA_LOGGERS
setting. Specify one or more Python library names as a comma-separated list. For example, if you want Prefect to capture logging statements from dask
and scipy
, you would configure it as follows:
PREFECT_LOGGING_EXTRA_LOGGERS=dask,scipy
This setting can be configured as an environment variable or in a Prefect profile.
For more details on configuring logging, you can check out the Prefect documentation:
- Prefect 2.x: https://docs-2.prefect.io/latest/guides/logs/
- Prefect 3.x: https://docs-3.prefect.io/3.0/develop/loggingMatt Alhonte
09/30/2024, 10:56 PMMarvin
09/30/2024, 10:56 PMPREFECT_LOGGING_EXTRA_LOGGERS
. You can include any Python library that uses the standard logging module.
Here are a few commonly used libraries that you might consider:
- dask
- scipy
- pandas
- numpy
- requests
- boto3
- sqlalchemy
These libraries typically have their own logging that can provide valuable insights when troubleshooting or monitoring.
For documentation, see:
- Prefect 2.x: https://docs-2.prefect.io/latest/guides/logs/
- Prefect 3.x: https://docs-3.prefect.io/3.0/develop/logging
You can specify them by setting the environment variable or a profile configuration like this:
PREFECT_LOGGING_EXTRA_LOGGERS=dask,scipy,pandas,numpy,requests,boto3,sqlalchemy
If you want to find more loggers, you can refer to the respective libraries' documentation and their logging configurations.Matt Alhonte
09/30/2024, 10:56 PMtensorflow
or tf
or something else?Marvin
09/30/2024, 10:57 PMtensorflow
.
Here's how you can specify TensorFlow along with other libraries in the PREFECT_LOGGING_EXTRA_LOGGERS
setting:
PREFECT_LOGGING_EXTRA_LOGGERS=tensorflow,dask,scipy,pandas,numpy,requests,boto3,sqlalchemy
In general, the logger names correspond to the top-level module names of the libraries. If you're unsure, you can usually find the logger name by checking the library's documentation or source code, generally looking for how they configure their logging.
For more details on logging configuration in Prefect, visit the related documentation pages:
- Prefect 2.x: https://docs-2.prefect.io/latest/guides/logs/
- Prefect 3.x: https://docs-3.prefect.io/3.0/develop/logging