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 12, 06:00 UTC
[BugFix] respect VLLM_LOGGING_LEVEL in logger (#29761)
Signed-off-by: Boyuan Feng <boyuan@meta.com>
Boyuan Feng committed
Dec 1, 2025 at 23:49 UTC
3b221cb661676fb2e9ae791ede9cb7f5cf4752d1
4 files changed
+9
-5
tests/conftest.py
+1
@@ -1174,6 +1174,7 @@ def caplog_mp_spawn(tmp_path, monkeypatch):
1174
"level": level,
1175
"filename": log_path.as_posix(),
1176
}
1177
+ config["loggers"]["vllm"]["level"] = level
1178
1179
config_path.write_text(json.dumps(config))
1180
tests/test_config.py
+2
-2
@@ -716,7 +716,7 @@ def test_is_chunked_prefill_supported(
716
):
717
model_config = ModelConfig(model_id, trust_remote_code=True)
718
assert model_config.attn_type == expected_attn_type
719
- with caplog_vllm.at_level(level=logging.DEBUG):
719
+ with caplog_vllm.at_level(level=logging.DEBUG, logger="vllm"):
720
assert model_config.is_chunked_prefill_supported == expected_result
721
assert reason in caplog_vllm.text
722
@@ -835,7 +835,7 @@ def test_is_prefix_caching_supported(
835
):
836
model_config = ModelConfig(model_id, trust_remote_code=True)
837
assert model_config.attn_type == expected_attn_type
838
- with caplog_vllm.at_level(level=logging.DEBUG):
838
+ with caplog_vllm.at_level(level=logging.DEBUG, logger="vllm"):
839
assert model_config.is_prefix_caching_supported == expected_result
840
assert reason in caplog_vllm.text
841
tests/test_logger.py
+2
-2
@@ -57,7 +57,7 @@ def test_default_vllm_root_logger_configuration(monkeypatch):
57
_configure_vllm_root_logger()
58
59
logger = logging.getLogger("vllm")
60
- assert logger.level == logging.DEBUG
60
+ assert logger.level == logging.INFO
61
assert not logger.propagate
62
63
handler = logger.handlers[0]
@@ -524,7 +524,7 @@ def mp_function(**kwargs):
524
525
526
def test_caplog_mp_fork(caplog_vllm, caplog_mp_fork):
527
- with caplog_vllm.at_level(logging.DEBUG), caplog_mp_fork():
527
+ with caplog_vllm.at_level(logging.DEBUG, logger="vllm"), caplog_mp_fork():
528
import multiprocessing
529
530
ctx = multiprocessing.get_context("fork")
vllm/logger.py
+4
-1
@@ -62,7 +62,7 @@ DEFAULT_LOGGING_CONFIG = {
62
"loggers": {
63
"vllm": {
64
"handlers": ["vllm"],
65
- "level": "DEBUG",
65
+ "level": envs.VLLM_LOGGING_LEVEL,
66
"propagate": False,
67
},
68
},
@@ -175,6 +175,9 @@ def _configure_vllm_root_logger() -> None:
175
vllm_handler["stream"] = envs.VLLM_LOGGING_STREAM
176
vllm_handler["formatter"] = "vllm_color" if _use_color() else "vllm"
177
178
+ vllm_loggers = logging_config["loggers"]["vllm"]
179
+ vllm_loggers["level"] = envs.VLLM_LOGGING_LEVEL
180
+
181
if envs.VLLM_LOGGING_CONFIG_PATH:
182
if not path.exists(envs.VLLM_LOGGING_CONFIG_PATH):
183
raise RuntimeError(