Unverified Commit 92e7562a authored by Tsukasa OI's avatar Tsukasa OI Committed by GitHub
Browse files

[Bugfix] Suppress non-TTY color output on the process name part of the log (#29714)


Signed-off-by: default avatarTsukasa OI <floss_llm@irq.a4lg.com>
parent 87d0d17a
......@@ -179,7 +179,12 @@ def set_process_title(
def _add_prefix(file: TextIO, worker_name: str, pid: int) -> None:
"""Add colored prefix to file output for log decoration."""
if envs.NO_COLOR:
is_tty = hasattr(file, "isatty") and file.isatty()
if (
envs.NO_COLOR
or envs.VLLM_LOGGING_COLOR == "0"
or (envs.VLLM_LOGGING_COLOR != "1" and not is_tty)
):
prefix = f"({worker_name} pid={pid}) "
else:
prefix = f"{CYAN}({worker_name} pid={pid}){RESET} "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment