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

#29799 [Bug]: Hardcoded escape codes in format strings

  • State: open
  • Author: @joshight
  • Labels: bug

### Check for existing issues

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

### What happened?

formatter = logging.Formatter( "\033[92m%(asctime)s - %(name)s:%(levelname)s\033[0m: %(filename)s:%(lineno)s - %(message)s", The escape codes \033[92m (green) and \033[0m (reset) are hardcoded into the format string. There's no env var check, no NO_COLOR honor, no toggle. The colors are applied unconditionally to every log line when JSON_LOGS=false.

### Steps to Reproduce

1. In BerriAI/litellm/main/litellm/_logging.py: formatter = logging.Formatter( "\033[92m%(asctime)s - %(name)s:%(levelname)s\033[0m: %(filename)s:%(lineno)s - %(message)s",

### Relevant log output

```shell

```

### What part of LiteLLM is this about?

_No response_

### What LiteLLM version are you on ?

v1.83.10-stable

### Twitter / LinkedIn details

_No response_

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d17h59m3s ago — entered · #import:https:::github.com:berriai:litellm post #2893
Issue 14257 is substantially harder because it affects proxy model discovery, request validation, aliasing, and compatibility across API behavior and configuration paths. Issue 29799 is a localized logging-format change with limited regression surface.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search