Commit e439e8d
committed
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 on 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>1 parent 4a80ad0 commit e439e8d
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
0 commit comments