Skip to content

vllm.logger

Logging configuration for vLLM.

Functions:

_VllmLogRecordFactory

Add vLLM process metadata while preserving the wrapped record factory.

_VllmLogger

Bases: Logger

Note: This class is just to provide type information. We actually patch the methods directly on the logging.Logger instance to avoid conflicting with other libraries such as intel_extension_for_pytorch.utils._logger.

Methods:

debug_once(msg, *args, scope='local')

As debug, but subsequent calls with the same message are silently dropped.

error_once(msg, *args, scope='local')

As error, but subsequent calls with the same message are silently dropped.

info_once(msg, *args, scope='local')

As info, but subsequent calls with the same message are silently dropped.

warning_once(msg, *args, scope='local')

As warning, but subsequent calls with the same message are silently dropped.

_configure_vllm_root_logger(config=None)

Configure logging from explicit config or bootstrap environment values.

_log_platform_warnings(config)

Emit platform diagnostics only after an enabled config is active.

_should_log_with_scope(scope)

Decide whether to log based on scope.

configure_logging(config)

Apply a logging configuration in the current process.

configure_logging_from_args(args)

Apply parsed logging arguments and retain them for child processes.

configure_logging_if_needed(config)

Apply a logging configuration unless it is already active in this process.

enable_trace_function_call(log_file_path, root_dir=None)

Enable tracing of every function call in code under root_dir. This is useful for debugging hangs or crashes. log_file_path is the path to the log file. root_dir is the root directory of the code to trace. If None, it is the vllm root directory.

Note that this call is thread-level, any threads calling this function will have the trace enabled. Other threads will not be affected.

init_logger(name)

Retrieve a logger and add vLLM's convenience logging methods.

set_vllm_process_name(process_name, *, skip_if_set=False)

Set the vLLM process name added to subsequent log records.