Fix third-party logger noise flooding stderr after structlog StreamHandler addition (#4649)

This commit is contained in:
Shuchang Zheng
2026-02-05 17:10:25 -08:00
committed by GitHub
parent bee4adb6e3
commit 820b0a6f06

View File

@@ -331,7 +331,11 @@ def setup_logger() -> None:
root_logger = logging.getLogger()
root_logger.handlers.clear()
root_logger.addHandler(handler)
root_logger.setLevel(LOG_LEVEL_VAL)
# Root at WARNING so third-party loggers (temporalio, grpc, litellm, …)
# only surface warnings and errors. Our packages get the configured level.
root_logger.setLevel(logging.WARNING)
for name in ("skyvern", "cloud", "workers", "scripts", "browser_controller"):
logging.getLogger(name).setLevel(LOG_LEVEL_VAL)
uvicorn_error = logging.getLogger("uvicorn.error")
uvicorn_error.disabled = True