Unverified Commit 325c1199 authored by youkaichao's avatar youkaichao Committed by GitHub
Browse files

[Misc] add logging level env var (#5045)

parent 8e192ff9
...@@ -59,6 +59,8 @@ body: ...@@ -59,6 +59,8 @@ body:
Please also paste or describe the results you observe instead of the expected results. If you observe an error, please paste the error message including the **full** traceback of the exception. It may be relevant to wrap error messages in ```` ```triple quotes blocks``` ````. Please also paste or describe the results you observe instead of the expected results. If you observe an error, please paste the error message including the **full** traceback of the exception. It may be relevant to wrap error messages in ```` ```triple quotes blocks``` ````.
Please set the environment variable `export VLLM_LOGGING_LEVEL=DEBUG` to turn on more logging to help debugging potential issues.
If you experienced crashes or hangs, it would be helpful to run vllm with `export VLLM_TRACE_FUNCTION=1` . All the function calls in vllm will be recorded. Inspect these log files, and tell which function crashes or hangs. If you experienced crashes or hangs, it would be helpful to run vllm with `export VLLM_TRACE_FUNCTION=1` . All the function calls in vllm will be recorded. Inspect these log files, and tell which function crashes or hangs.
placeholder: | placeholder: |
A clear and concise description of what the bug is. A clear and concise description of what the bug is.
......
...@@ -22,6 +22,7 @@ if TYPE_CHECKING: ...@@ -22,6 +22,7 @@ if TYPE_CHECKING:
VLLM_DO_NOT_TRACK: bool = False VLLM_DO_NOT_TRACK: bool = False
VLLM_USAGE_SOURCE: str = "" VLLM_USAGE_SOURCE: str = ""
VLLM_CONFIGURE_LOGGING: int = 1 VLLM_CONFIGURE_LOGGING: int = 1
VLLM_LOGGING_LEVEL: str = "INFO"
VLLM_LOGGING_CONFIG_PATH: Optional[str] = None VLLM_LOGGING_CONFIG_PATH: Optional[str] = None
VLLM_TRACE_FUNCTION: int = 0 VLLM_TRACE_FUNCTION: int = 0
VLLM_ATTENTION_BACKEND: Optional[str] = None VLLM_ATTENTION_BACKEND: Optional[str] = None
...@@ -178,6 +179,10 @@ environment_variables: Dict[str, Callable[[], Any]] = { ...@@ -178,6 +179,10 @@ environment_variables: Dict[str, Callable[[], Any]] = {
"VLLM_LOGGING_CONFIG_PATH": "VLLM_LOGGING_CONFIG_PATH":
lambda: os.getenv("VLLM_LOGGING_CONFIG_PATH"), lambda: os.getenv("VLLM_LOGGING_CONFIG_PATH"),
# this is used for configuring the default logging level
"VLLM_LOGGING_LEVEL":
lambda: os.getenv("VLLM_LOGGING_LEVEL", "INFO"),
# Trace function calls # Trace function calls
# If set to 1, vllm will trace function calls # If set to 1, vllm will trace function calls
# Useful for debugging # Useful for debugging
......
...@@ -14,6 +14,7 @@ import vllm.envs as envs ...@@ -14,6 +14,7 @@ import vllm.envs as envs
VLLM_CONFIGURE_LOGGING = envs.VLLM_CONFIGURE_LOGGING VLLM_CONFIGURE_LOGGING = envs.VLLM_CONFIGURE_LOGGING
VLLM_LOGGING_CONFIG_PATH = envs.VLLM_LOGGING_CONFIG_PATH VLLM_LOGGING_CONFIG_PATH = envs.VLLM_LOGGING_CONFIG_PATH
VLLM_LOGGING_LEVEL = envs.VLLM_LOGGING_LEVEL
_FORMAT = "%(levelname)s %(asctime)s %(filename)s:%(lineno)d] %(message)s" _FORMAT = "%(levelname)s %(asctime)s %(filename)s:%(lineno)d] %(message)s"
_DATE_FORMAT = "%m-%d %H:%M:%S" _DATE_FORMAT = "%m-%d %H:%M:%S"
...@@ -30,7 +31,7 @@ DEFAULT_LOGGING_CONFIG = { ...@@ -30,7 +31,7 @@ DEFAULT_LOGGING_CONFIG = {
"vllm": { "vllm": {
"class": "logging.StreamHandler", "class": "logging.StreamHandler",
"formatter": "vllm", "formatter": "vllm",
"level": "INFO", "level": VLLM_LOGGING_LEVEL,
"stream": "ext://sys.stdout", "stream": "ext://sys.stdout",
}, },
}, },
......
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