mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
fix(proxy): only wire healthcheck filter in JSON log config when paths configured
Mirror the _suppress_loggers() guard so JSON_LOGS=true users who have not set LITELLM_DISABLE_ACCESS_LOG_PATHS no longer get unused dictConfig filter machinery
This commit is contained in:
parent
969a764378
commit
7df0ca6017
1 changed files with 12 additions and 6 deletions
|
|
@ -399,11 +399,17 @@ def _get_uvicorn_json_log_config():
|
||||||
"()": json_formatter_class,
|
"()": json_formatter_class,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"filters": {
|
**(
|
||||||
"healthcheck": {
|
{
|
||||||
"()": "litellm._logging.HealthCheckAccessLogFilter",
|
"filters": {
|
||||||
},
|
"healthcheck": {
|
||||||
},
|
"()": "litellm._logging.HealthCheckAccessLogFilter",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
if _DISABLED_ACCESS_LOG_PATHS
|
||||||
|
else {}
|
||||||
|
),
|
||||||
"handlers": {
|
"handlers": {
|
||||||
"default": {
|
"default": {
|
||||||
"formatter": "json",
|
"formatter": "json",
|
||||||
|
|
@ -414,7 +420,7 @@ def _get_uvicorn_json_log_config():
|
||||||
"formatter": "access",
|
"formatter": "access",
|
||||||
"class": "logging.StreamHandler",
|
"class": "logging.StreamHandler",
|
||||||
"stream": "ext://sys.stdout",
|
"stream": "ext://sys.stdout",
|
||||||
"filters": ["healthcheck"],
|
**({"filters": ["healthcheck"]} if _DISABLED_ACCESS_LOG_PATHS else {}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"loggers": {
|
"loggers": {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue