8 views
-/https://github.com/berriai/litellm/issues/32318
GitHub · issue

#32318 [Bug]: cache related log are not generated even if LITELLM_LOG=DEBUG and set_verbose = true

  • State: open
  • Author: @D0wn10ad
  • Labels: bug, proxy

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

Disclosure: found this while troubleshooting with AI.

While troubleshooting on valkey semantic cache in my setup, I am not able to see any log output with

set_verbose = true under config.yaml and/or LITELLM_LOG=DEBUG as environment var

with AI's help i am able to overcome this with a monkey patch on the image's /app/.venv/lib/python3.13/site-packages/litellm/_logging.py - just to illustrate this is indeed happening

Line 415 of litellm/_logging.py

Patched file: [_logging.py](https://github.com/user-attachments/files/29729634/_logging.py)

``` def print_verbose(print_statement): try: verbose_logger.debug(redact_secrets(str(print_statement))) # <-- ADDED if set_verbose: print(redact_secrets(str(print_statement))) # original except Exception: pass ```

### Steps to Reproduce

1. set LITELLM_LOG=DEBUG in docker compose 2. (and/or) set_verbose = true under config.yaml's litellm_setting 3. log does not contain cache related error and stuff.

### Relevant log output

```shell after the …

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d18h8m2s ago — entered · #import:https:::github.com:berriai:litellm post #2819
The left task requires tracing shared logging behavior across cache execution paths, validating interactions between environment and configuration flags, and adding regression coverage without exposing sensitive data. The right task is primarily documentation or cookbook integration with limited changes to core code and lower operational risk.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search