How to add extra loggers to Prefect 2.0?

Imagine that some third-party package you want to use Prefect with uses the following loggers:

class Loggers(Enum):
    OMETA = "OMetaAPI"
    CLI = "Metadata"
    PROFILER = "Profiler"
    INGESTION = "Ingestion"
    UTILS = "Utils"

To make sure that logs streamed from all of those loggers are displayed in your Prefect UI, run the following CLI command:

prefect config set PREFECT_LOGGING_EXTRA_LOGGERS = "Ingestion,OMetaAPI,Metadata,Profiler,Utils"

This adds those extra loggers to your Prefect Profile settings.

3 Likes