[Core] Fix broken log configuration (#10458)

Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
Russell Bryant
2024-11-23 10:23:51 +08:00
committed by GitHub
parent 9195dbdbca
commit ebda51968b
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -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)