Skip to content

fix(proxy): set verbose_logger level when LITELLM_LOG=INFO#26401

Merged
krrish-berri-2 merged 2 commits into
BerriAI:litellm-oss-staging-04-25-2026from
he-yufeng:fix/litellm-log-info-missing-verbose-logger
Apr 25, 2026
Merged

fix(proxy): set verbose_logger level when LITELLM_LOG=INFO#26401
krrish-berri-2 merged 2 commits into
BerriAI:litellm-oss-staging-04-25-2026from
he-yufeng:fix/litellm-log-info-missing-verbose-logger

Conversation

@he-yufeng

Copy link
Copy Markdown
Contributor

Fixes #26396.

The `LITELLM_LOG=INFO` branch in `litellm/proxy/proxy_server.py` only set `verbose_router_logger` and `verbose_proxy_logger`. The third logger `verbose_logger` (used by e.g. `token_based_routing.py` via `litellm._logging.verbose_logger.info(...)`) inherited the Python root default (WARNING), so its INFO-level messages were silently filtered.

That's inconsistent with:

  • The neighbouring `LITELLM_LOG=DEBUG` branch, which configures all three loggers.
  • The `debug=True` / `detailed_debug=True` branches earlier in the same block, which also configure all three.

Include `verbose_logger` in the INFO branch so all three loggers behave the same.

Test plan

  • `LITELLM_LOG=INFO litellm --config ...` now emits `verbose_logger.info(...)` messages (previously suppressed).
  • No change to other log levels or branches.
  • `uv run black .` clean on the touched file.

yuneng-berri and others added 2 commits April 23, 2026 17:55
Fixes BerriAI#26396.

The `LITELLM_LOG=INFO` branch in proxy_server only set
`verbose_router_logger` and `verbose_proxy_logger`. The third logger
`verbose_logger` (used by e.g. `token_based_routing.py`) inherited the
Python root default (WARNING) and its INFO-level messages were
silently filtered — inconsistent with the neighbouring DEBUG branch
which configures all three and with the `debug=True` / `detailed_debug`
paths above.

Include `verbose_logger` in the INFO branch as well so all three
loggers behave the same.
@veria-ai

veria-ai Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Low: Logging level fix only

This PR adds verbose_logger.setLevel(logging.INFO) to match the existing pattern for verbose_router_logger and verbose_proxy_logger when LITELLM_LOG=INFO. The same logger is already set in the DEBUG branch. No security impact.


Status: 0 open
Risk: 1/10

Posted by Veria AI · 2026-04-24T08:50:23.266Z

@greptile-apps

greptile-apps Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a missing verbose_logger.setLevel(logging.INFO) call in the LITELLM_LOG=INFO branch of proxy_server.py. The omission caused INFO-level messages from verbose_logger (e.g. in token_based_routing.py) to be silently dropped while the other two loggers were correctly configured. The single-line addition now makes the INFO branch consistent with the DEBUG branch, the debug=True branch, and the detailed_debug=True branch.

Confidence Score: 5/5

This PR is safe to merge — it's a one-line additive fix with no risk of regression.

The change adds a single setLevel call that was clearly missing compared to every other sibling branch. No logic is altered, no interfaces change, and the fix is strictly additive.

No files require special attention.

Important Files Changed

Filename Overview
litellm/proxy/proxy_server.py Adds verbose_logger.setLevel(logging.INFO) and the corresponding import to the LITELLM_LOG=INFO branch, matching every other log-level branch in the same function.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[initialize called] --> B{debug is True?}
    B -- Yes --> C[Set all 3 loggers to INFO]
    B -- No --> D{detailed_debug is True?}
    D -- Yes --> E[Set all 3 loggers to DEBUG]
    D -- No --> F{LITELLM_LOG env var set?}
    F -- INFO --> G["Set verbose_logger ✅ NEW\nSet verbose_router_logger\nSet verbose_proxy_logger\n→ all INFO"]
    F -- DEBUG --> H["Set verbose_logger\nSet verbose_router_logger\nSet verbose_proxy_logger\n→ all DEBUG"]
    F -- other/unset --> I[No logger change]
Loading

Reviews (1): Last reviewed commit: "fix(proxy): set verbose_logger level whe..." | Re-trigger Greptile

@codspeed-hq

codspeed-hq Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 16 untouched benchmarks


Comparing he-yufeng:fix/litellm-log-info-missing-verbose-logger (c26c446) with main (7b47dff)

Open in CodSpeed

@he-yufeng he-yufeng changed the base branch from main to litellm_oss_branch April 24, 2026 20:01
@krrish-berri-2 krrish-berri-2 changed the base branch from litellm_oss_branch to litellm-oss-staging-04-25-2026 April 25, 2026 19:12
@krrish-berri-2 krrish-berri-2 merged commit f63a6f1 into BerriAI:litellm-oss-staging-04-25-2026 Apr 25, 2026
52 of 53 checks passed
yugborana pushed a commit to yugborana/litellm that referenced this pull request Jun 2, 2026
…6401)

Fixes BerriAI#26396.

The `LITELLM_LOG=INFO` branch in proxy_server only set
`verbose_router_logger` and `verbose_proxy_logger`. The third logger
`verbose_logger` (used by e.g. `token_based_routing.py`) inherited the
Python root default (WARNING) and its INFO-level messages were
silently filtered — inconsistent with the neighbouring DEBUG branch
which configures all three and with the `debug=True` / `detailed_debug`
paths above.

Include `verbose_logger` in the INFO branch as well so all three
loggers behave the same.

Co-authored-by: yuneng-jiang <yuneng@berri.ai>
Co-authored-by: Yufeng He <40085740+universeplayer@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants