Commit adee1a2
Suppress non-TTY color output on the process name part of the log
Regular logs are not decorated with colors when non-TTY stdout/stderr is
selected as logging output (c.f. `_use_color` function in `vllm/logger.py`).
However, process-based decoration part in `vllm/utils/system_utils.py`
did not implement color output suppression as the regular logger.
It resulted in excess escape sequences in a redirected output
(e.g. `log.txt` after running `vllm serve ... >log.txt 2>&1`) when:
1. The environment variable `NO_COLOR` is evaluated to `False` and
2. The output is non-TTY stdout/stderr.
This commit fixes this issue by implementing the same logic
as the regular logger.
Signed-off-by: Tsukasa OI <floss_llm@irq.a4lg.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>1 parent 4a80ad0 commit adee1a2
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
179 | 184 | | |
180 | 185 | | |
181 | 186 | | |
| |||
0 commit comments