[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:
co-authored by
AI Assistant
parent
fa6c407d15
commit
45d56c0baf
+8
-4
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user