| [Refactor][Misc] Use lazy formatting for log (#8756)
### What this PR does / why we need it?
This PR replaces eager log message formatting with lazy logging
formatting across the repository.
- Converts logger.*(f"...") and logging.*(f"...") calls to lazy
%-style logging arguments.
- Replaces deprecated logger.warn(...) usage with
logger.warning(...).
- Adds logger.isEnabledFor(logging.DEBUG) guards for debug logs whose
arguments include function or method calls.
- Enables Ruff G004 enforcement by removing it from ignore and
registering vllm.logger.logger as a logger object.
This avoids unnecessary string formatting and expensive argument
evaluation when the corresponding log level is disabled.
### Does this PR introduce _any_ user-facing change?
### How was this patch tested?
- vLLM version: v0.19.0
- vLLM main:
https://github.com/vllm-project/vllm/commit/6f786f2c506cb07f4566771fdc62e640e2c4a176
---------
Signed-off-by: MrZ20 <2609716663@qq.com> | 1 个月前 |