[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
+3 -3
View File
@@ -2,6 +2,7 @@
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import dataclasses
import logging
import weakref
from collections import Counter
from collections.abc import Callable
@@ -11,7 +12,6 @@ from unittest.mock import patch
import torch
import vllm.envs as envs
from vllm.compilation.counter import compilation_counter
from vllm.compilation.monitor import validate_cudagraph_capturing_enabled
from vllm.config import CUDAGraphMode, VllmConfig
@@ -164,7 +164,7 @@ class CUDAGraphWrapper:
assumption on the dynamic shape (batch size) of the runtime inputs, as a
trade-off for staying orthogonal to compilation logic. Nevertheless,
tracing and checking the input addresses to be consistent during replay is
guaranteed when VLLM_LOGGING_LEVEL == "DEBUG".
guaranteed when vLLM debug logging is enabled.
"""
_all_instances: ClassVar[weakref.WeakSet["CUDAGraphWrapper"]] = weakref.WeakSet()
@@ -188,7 +188,7 @@ class CUDAGraphWrapper:
self.compilation_config = vllm_config.compilation_config
self.first_run_finished = False
self.is_debugging_mode = envs.VLLM_LOGGING_LEVEL == "DEBUG"
self.is_debugging_mode = logger.isEnabledFor(logging.DEBUG)
self._runnable_str = str(runnable) if self.is_debugging_mode else None
# assert runtime_mode is not NONE(no cudagraph), otherwise, we don't