A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 16, 07:00 UTC
[Core] Fix broken log configuration (#10458)
Signed-off-by: Russell Bryant <rbryant@redhat.com>
Russell Bryant committed
Nov 22, 2024 at 21:23 UTC
ebda51968b12b85c8b5b82727b2b7713dfc44f88
2 files changed
+7
-2
examples/logging_configuration.md
+1
-1
@@ -118,7 +118,7 @@ configuration for the root vLLM logger and for the logger you wish to silence:
118
{
119
"formatters": {
120
"vllm": {
121
- "class": "vllm.logging.NewLineFormatter",
121
+ "class": "vllm.logging_utils.NewLineFormatter",
122
"datefmt": "%m-%d %H:%M:%S",
123
"format": "%(levelname)s %(asctime)s %(filename)s:%(lineno)d] %(message)s"
124
}
vllm/logger.py
+6
-1
@@ -50,7 +50,7 @@ DEFAULT_LOGGING_CONFIG = {
50
51
52
def _configure_vllm_root_logger() -> None:
53
- logging_config: Optional[Dict] = None
53
+ logging_config: Dict = {}
54
55
if not VLLM_CONFIGURE_LOGGING and VLLM_LOGGING_CONFIG_PATH:
56
raise RuntimeError(
@@ -75,6 +75,11 @@ def _configure_vllm_root_logger() -> None:
75
type(custom_config).__name__)
76
logging_config = custom_config
77
78
+ for formatter in logging_config.get("formatters", {}).values():
79
+ # This provides backwards compatibility after #10134.
80
+ if formatter.get("class") == "vllm.logging.NewLineFormatter":
81
+ formatter["class"] = "vllm.logging_utils.NewLineFormatter"
82
+
83
if logging_config:
84
dictConfig(logging_config)
85