mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
fix(proxy_cli.py): enable json logging via litellm_settings param on config
allows user to enable json logs without needing to figure out env variables
This commit is contained in:
parent
793c7b124b
commit
3167bee25a
3 changed files with 30 additions and 1 deletions
|
@ -429,6 +429,19 @@ def run_server(
|
|||
|
||||
proxy_config = ProxyConfig()
|
||||
_config = asyncio.run(proxy_config.get_config(config_file_path=config))
|
||||
### LITELLM SETTINGS ###
|
||||
litellm_settings = _config.get("litellm_settings", None)
|
||||
if (
|
||||
litellm_settings is not None
|
||||
and "json_logs" in litellm_settings
|
||||
and litellm_settings["json_logs"] == True
|
||||
):
|
||||
import litellm
|
||||
|
||||
litellm.json_logs = True
|
||||
|
||||
litellm._turn_on_json()
|
||||
### GENERAL SETTINGS ###
|
||||
general_settings = _config.get("general_settings", {})
|
||||
if general_settings is None:
|
||||
general_settings = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue