[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
@@ -4,6 +4,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
import logging
|
||||
import multiprocessing
|
||||
import os
|
||||
import signal
|
||||
@@ -63,7 +64,7 @@ def suppress_stdout():
|
||||
"""Suppress stdout from C libraries at the file descriptor level.
|
||||
|
||||
Only suppresses stdout, not stderr, to preserve error messages.
|
||||
Suppression is disabled when VLLM_LOGGING_LEVEL is set to DEBUG.
|
||||
Suppression is disabled when vLLM debug logging is enabled.
|
||||
|
||||
Example:
|
||||
with suppress_stdout():
|
||||
@@ -72,7 +73,7 @@ def suppress_stdout():
|
||||
|
||||
"""
|
||||
# Don't suppress if logging level is DEBUG
|
||||
if envs.VLLM_LOGGING_LEVEL == "DEBUG":
|
||||
if logger.isEnabledFor(logging.DEBUG):
|
||||
yield
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user