The answer I got so far:
- You can disable the Python logger e.g.
logging.getLogger("prefect").enabled = False
orPREFECT_LOGGING_LEVEL=ERROR
- If you want the logger temporarily disabled for some tests, you can write a fixture that sets and unsets the enabled attribute. It must be set after
prefect.logging.setup_logging
is called.