Ravish Mallya
09/18/2025, 5:08 PMMarvin
09/18/2025, 5:08 PMMarvin
09/18/2025, 5:11 PMPREFECT_LOGGING_LEVEL=WARNING
- Disable shipping logs to the API (console-only logs):
- Set PREFECT_LOGGING_TO_API_ENABLED=false
- Tame volume:
- Avoid logging inside tight loops or logging large payloads
- Keep messages small; don’t log big dicts/dataframes
- Adjust batching (trade latency for fewer API calls):
- PREFECT_LOGGING_TO_API_BATCH_INTERVAL=5
- PREFECT_LOGGING_TO_API_BATCH_SIZE=<bytes>
- Keep log_prints
off (it’s off by default) to avoid capturing every `print`:
- PREFECT_LOGGING_LOG_PRINTS=false
If you’re seeing slowdowns, can you share:
- Approximate log rate (lines/second) and whether you’re logging in hot loops
- Whether this is Prefect Cloud or self-hosted Server
- Any large/structured payloads in messages
References:
- Logging handlers API: API: logging handlers
- Logging customization: Advanced: logging customization
- Settings and profiles: Concepts: settings and profiles
- Rate limits: Concepts: rate limits