Files
litellm/tests/test_litellm/litellm_core_utils
Cole McIntosh 2c60c316ec Fix: Initialize JSON logging for all loggers when JSON_LOGS=True (#12206)
When JSON_LOGS=True is set, error logs were not being formatted as JSON despite
the configuration. This was because the logging initialization code configured
individual loggers but failed to properly initialize all loggers with the JSON
formatter.

This fix ensures that when json_logs is enabled, the _initialize_loggers_with_handler()
function is called to:
- Configure all loggers (root, LiteLLM, Router, Proxy) with JSON formatter
- Disable logger propagation to prevent duplicate entries
- Set up exception handlers for JSON formatting

Fixes LIT-267
2025-07-02 12:18:28 -07:00
..