litellm - ✅(Solved) Fix [Bug]: verbose_logger level not set when LITELLM_LOG=INFO, causing INFO logs to be suppressed [3 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
BerriAI/litellm#26396Fetched 2026-04-24 10:36:30
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
cross-referenced ×2labeled ×1referenced ×1

Fix Action

Fixed

PR fix notes

PR #26397: fix(proxy): add verbose_logger to LITELLM_LOG=INFO branch

Description (problem / solution / changelog)

Summary

Fixes #26396

The INFO branch in initialize() only set verbose_router_logger and verbose_proxy_logger, omitting verbose_logger. Because verbose_logger inherits the root logger level (default: WARNING), all verbose_logger.info(...) calls in the core package — e.g. token_based_routing.py — were silently suppressed when LITELLM_LOG=INFO.

Change

Aligns the INFO branch with the DEBUG branch: imports and sets all three loggers to logging.INFO.

Before:

from litellm._logging import verbose_proxy_logger, verbose_router_logger
verbose_router_logger.setLevel(level=logging.INFO)
verbose_proxy_logger.setLevel(level=logging.INFO)

After:

from litellm._logging import verbose_logger, verbose_proxy_logger, verbose_router_logger
verbose_logger.setLevel(level=logging.INFO)   # ← was missing
verbose_router_logger.setLevel(level=logging.INFO)
verbose_proxy_logger.setLevel(level=logging.INFO)

Test plan

  • LITELLM_LOG=INFOverbose_logger.info(...) messages now appear
  • LITELLM_LOG=DEBUG → unchanged behaviour
  • LITELLM_LOG=WARNING/ERROR/CRITICAL → unchanged behaviour (handled by separate PR #24921)

🤖 Generated with Claude Code

Changed files

  • litellm/proxy/proxy_server.py (modified, +6/-1)

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

Description (problem / solution / changelog)

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.

Changed files

  • litellm/proxy/proxy_server.py (modified, +6/-1)

Code Example

if litellm_log_setting.upper() == "INFO":
    from litellm._logging import verbose_proxy_logger, verbose_router_logger
    # ❌ verbose_logger is missing here!
    
    verbose_router_logger.setLevel(level=logging.INFO)
    verbose_proxy_logger.setLevel(level=logging.INFO)

---

litellm._logging.verbose_logger.info(...)

---

verbose_logger.setLevel(level=logging.INFO)

---
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

Description:

There is a bug in the LiteLLM source code where the verbose_logger logging level is not correctly configured when LITELLM_LOG is set to INFO.

Location: File: litellm/proxy/proxy_server.py Lines: 5635-5647 (in version 1.83.3-stable)

Current Behavior: In the block handling LITELLM_LOG=INFO, only verbose_router_logger and verbose_proxy_logger have their levels set. The verbose_logger is omitted.

if litellm_log_setting.upper() == "INFO":
    from litellm._logging import verbose_proxy_logger, verbose_router_logger
    # ❌ verbose_logger is missing here!
    
    verbose_router_logger.setLevel(level=logging.INFO)
    verbose_proxy_logger.setLevel(level=logging.INFO)

Expected Behavior: Consistent with other branches (such as debug=True or detailed_debug=True), all three loggers should be configured:

  • verbose_logger
  • verbose_router_logger
  • verbose_proxy_logger

Impact: Since verbose_logger is not explicitly set, it inherits the Python root logger's default level (WARNING). Consequently, all INFO level logs generated by verbose_logger are filtered out and not displayed.

Reproduction Example: The file token_based_routing.py uses the following call:

litellm._logging.verbose_logger.info(...)

Due to the missing configuration mentioned above, these INFO logs will not appear when LITELLM_LOG=INFO is set.

Suggested Fix: Add the following line inside the if litellm_log_setting.upper() == "INFO": block:

verbose_logger.setLevel(level=logging.INFO)

Steps to Reproduce

Relevant log output

What part of LiteLLM is this about?

Other

What LiteLLM version are you on ?

1.83.3-stable

Twitter / LinkedIn details

No response

extent analysis

TL;DR

Add the missing line verbose_logger.setLevel(level=logging.INFO) to the if litellm_log_setting.upper() == "INFO": block in litellm/proxy/proxy_server.py to correctly configure the verbose_logger logging level.

Guidance

  • Verify the issue by checking the log output when LITELLM_LOG=INFO is set and looking for missing INFO level logs from verbose_logger.
  • Add the suggested fix line to the specified block in litellm/proxy/proxy_server.py to configure verbose_logger correctly.
  • Test the fix by running the reproduction example in token_based_routing.py with LITELLM_LOG=INFO set and checking for the presence of INFO level logs from verbose_logger.
  • Ensure that the fix does not introduce any unintended logging behavior by reviewing the log output for other log levels and components.

Example

if litellm_log_setting.upper() == "INFO":
    from litellm._logging import verbose_proxy_logger, verbose_router_logger, verbose_logger
    verbose_logger.setLevel(level=logging.INFO)
    verbose_router_logger.setLevel(level=logging.INFO)
    verbose_proxy_logger.setLevel(level=logging.INFO)

Notes

This fix assumes that the verbose_logger is intended to log at the INFO level when LITELLM_LOG=INFO is set, consistent with other branches in the code.

Recommendation

Apply the suggested workaround by adding the missing line to the if litellm_log_setting.upper() == "INFO": block, as this directly addresses the identified issue and restores the expected logging behavior.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - ✅(Solved) Fix [Bug]: verbose_logger level not set when LITELLM_LOG=INFO, causing INFO logs to be suppressed [3 pull requests, 1 participants]