mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-10 15:28:14 -05:00
fix(logging): Prevent LiteLLM logs from leaking through root logger (#11356)
Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
@@ -583,6 +583,23 @@ def get_uvicorn_json_log_config() -> dict:
|
||||
'level': 'INFO',
|
||||
'propagate': False,
|
||||
},
|
||||
# Suppress LiteLLM loggers to prevent them from leaking through root logger
|
||||
# This is necessary because logging.config.dictConfig() resets the .disabled flag
|
||||
'LiteLLM': {
|
||||
'handlers': [],
|
||||
'level': 'CRITICAL',
|
||||
'propagate': False,
|
||||
},
|
||||
'LiteLLM Router': {
|
||||
'handlers': [],
|
||||
'level': 'CRITICAL',
|
||||
'propagate': False,
|
||||
},
|
||||
'LiteLLM Proxy': {
|
||||
'handlers': [],
|
||||
'level': 'CRITICAL',
|
||||
'propagate': False,
|
||||
},
|
||||
},
|
||||
'root': {'level': 'INFO', 'handlers': ['default']},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user