#31878 feat(logging): add async_log_deployment_failure_event hook for per-attempt fallback signals
## Problem
LiteLLM's custom logger interface exposes `log_success_event` and `log_failure_event`, but these fire at the end of the entire request — after all fallbacks have been exhausted. There is no hook that fires per-attempt when a specific deployment fails and the router is about to try the next one. Observability integrations that need per-deployment failure signals (circuit breaker metrics, per-model error dashboards) must resort to parsing proxy logs instead.
## Proposed fix
Add `async_log_deployment_failure_event` as an optional async method on `CustomLogger`. The router calls it after each failed attempt, before triggering fallback, with the deployment name, exception, and attempt metadata. Custom integrations can implement this method to record per-deployment failure signals without waiting for the entire request to settle.
## Files
- `litellm/integrations/custom_logger.py` - `litellm/router.py` (fallback dispatch)