Debugging
2 levels of debugging supported.
- debug (prints info logs)
- detailed debug (prints debug logs)
The proxy also supports json logs. See here
debug
via cli
$ litellm --debug
via env
os.environ["LITELLM_LOG"] = "INFO"
detailed debug
via cli
$ litellm --detailed_debug
via env
os.environ["LITELLM_LOG"] = "DEBUG"
JSON LOGS
Set JSON_LOGS="True"
in your env:
export JSON_LOGS="True"
OR
Set json_logs: true
in your yaml:
litellm_settings:
json_logs: true
Start proxy
$ litellm
The proxy will now all logs in json format.
Control Log Output
Turn off fastapi's default 'INFO' logs
- Turn on 'json logs'
litellm_settings:
json_logs: true
- Set
LITELLM_LOG
to 'ERROR'
Only get logs if an error occurs.
LITELLM_LOG="ERROR"
- Start proxy
$ litellm
Expected Output:
# no info statements