mirror of
https://github.com/vllm-project/vllm.git
synced 2025-10-20 14:53:52 +08:00
[Core] Fix broken log configuration (#10458)
Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
@ -118,7 +118,7 @@ configuration for the root vLLM logger and for the logger you wish to silence:
|
||||
{
|
||||
"formatters": {
|
||||
"vllm": {
|
||||
"class": "vllm.logging.NewLineFormatter",
|
||||
"class": "vllm.logging_utils.NewLineFormatter",
|
||||
"datefmt": "%m-%d %H:%M:%S",
|
||||
"format": "%(levelname)s %(asctime)s %(filename)s:%(lineno)d] %(message)s"
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ DEFAULT_LOGGING_CONFIG = {
|
||||
|
||||
|
||||
def _configure_vllm_root_logger() -> None:
|
||||
logging_config: Optional[Dict] = None
|
||||
logging_config: Dict = {}
|
||||
|
||||
if not VLLM_CONFIGURE_LOGGING and VLLM_LOGGING_CONFIG_PATH:
|
||||
raise RuntimeError(
|
||||
@ -75,6 +75,11 @@ def _configure_vllm_root_logger() -> None:
|
||||
type(custom_config).__name__)
|
||||
logging_config = custom_config
|
||||
|
||||
for formatter in logging_config.get("formatters", {}).values():
|
||||
# This provides backwards compatibility after #10134.
|
||||
if formatter.get("class") == "vllm.logging.NewLineFormatter":
|
||||
formatter["class"] = "vllm.logging_utils.NewLineFormatter"
|
||||
|
||||
if logging_config:
|
||||
dictConfig(logging_config)
|
||||
|
||||
|
Reference in New Issue
Block a user