[Misc] Add an env var VLLM_LOGGING_PREFIX, if set, it will be prepend to all logging messages (#9590)

This commit is contained in:
Flex Wang
2024-10-22 20:17:28 -07:00
committed by GitHub
parent 65050a40e6
commit 29061ed9df
2 changed files with 8 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ if TYPE_CHECKING:
VLLM_USAGE_SOURCE: str = ""
VLLM_CONFIGURE_LOGGING: int = 1
VLLM_LOGGING_LEVEL: str = "INFO"
VLLM_LOGGING_PREFIX: str = ""
VLLM_LOGGING_CONFIG_PATH: Optional[str] = None
VLLM_TRACE_FUNCTION: int = 0
VLLM_ATTENTION_BACKEND: Optional[str] = None
@@ -268,6 +269,10 @@ environment_variables: Dict[str, Callable[[], Any]] = {
"VLLM_LOGGING_LEVEL":
lambda: os.getenv("VLLM_LOGGING_LEVEL", "INFO"),
# if set, VLLM_LOGGING_PREFIX will be prepended to all log messages
"VLLM_LOGGING_PREFIX":
lambda: os.getenv("VLLM_LOGGING_PREFIX", ""),
# Trace function calls
# If set to 1, vllm will trace function calls
# Useful for debugging