[Core] Model console logging as CLI configuration (#57205)

Add `--logging-config` CLI argument which can be supplied as
JSON or using dotted arguments. The `--log-level` argument
is provided for convenience, and `--log-config-file` is deprecated
in favor of `--logging-config.pylogging_config_file`.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Co-authored-by: AI Assistant <noreply@openai.com>
This commit is contained in:
Mark McLoughlin
2026-09-25 11:36:59 +01:00
committed by GitHub
co-authored by AI Assistant
parent fa6c407d15
commit 45d56c0baf
36 changed files with 439 additions and 134 deletions
+8 -4
View File
@@ -1430,16 +1430,20 @@ def temporary_enable_log_propagate():
import logging
logger = logging.getLogger("vllm")
previous_propagate = logger.propagate
logger.propagate = True
yield
logger.propagate = False
logger.propagate = previous_propagate
@pytest.fixture()
def caplog_vllm(temporary_enable_log_propagate, caplog):
# To capture vllm log, we should enable propagate=True temporarily
# because caplog depends on logs propagated to the root logger.
yield caplog
# caplog depends on logs propagated to the root logger. The vLLM logger
# inherits this INFO level until runtime initialization configures it.
import logging
with caplog.at_level(logging.INFO):
yield caplog
@pytest.fixture()