Vllm.Logger (VLLM v0.3.0)

Copy Markdown View Source

Logging configuration for vLLM.

Version

  • Requested: 0.14.0
  • Observed at generation: 0.14.0

Runtime Options

All functions accept a __runtime__ option for controlling execution behavior:

Vllm.Logger.some_function(args, __runtime__: [timeout: 120_000])

Supported runtime options

  • :timeout - Call timeout in milliseconds (default: 120,000ms / 2 minutes)
  • :timeout_profile - Use a named profile (:default, :ml_inference, :batch_job, :streaming)
  • :stream_timeout - Timeout for streaming operations (default: 1,800,000ms / 30 minutes)
  • :session_id - Override the session ID for this call
  • :pool_name - Target a specific Snakepit pool (multi-pool setups)
  • :affinity - Override session affinity (:hint, :strict_queue, :strict_fail_fast)

Timeout Profiles

  • :default - 2 minute timeout for regular calls
  • :ml_inference - 10 minute timeout for ML/LLM workloads
  • :batch_job - Unlimited timeout for long-running jobs
  • :streaming - 2 minute timeout, 30 minute stream_timeout

Example with timeout override

# For a long-running ML inference call
Vllm.Logger.predict(data, __runtime__: [timeout_profile: :ml_inference])

# Or explicit timeout
Vllm.Logger.predict(data, __runtime__: [timeout: 600_000])

# Route to a pool and enforce strict affinity
Vllm.Logger.predict(data, __runtime__: [pool_name: :strict_pool, affinity: :strict_queue])

See SnakeBridge.Defaults for global timeout configuration.

Summary

Functions

Logging configuration for vLLM.

Python module attribute vllm.logger._DATE_FORMAT.

Python module attribute vllm.logger._FORMAT.

Python module attribute vllm.logger._METHODS_TO_PATCH.

Logging configuration for vLLM.

Logging configuration for vLLM.

Logging configuration for vLLM.

Decide whether to log based on scope

Logging configuration for vLLM.

Logging configuration for vLLM.

Python binding for vllm.logger.current_formatter_type.

Python module attribute vllm.logger.DEFAULT_LOGGING_CONFIG.

Enable tracing of every function call in code under root_dir.

The main purpose of this function is to ensure that loggers are

Logging configuration for vLLM.

Python module attribute vllm.logger.logger.

Logging configuration for vLLM.

Functions

_configure_vllm_root_logger(opts \\ [])

@spec _configure_vllm_root_logger(keyword()) ::
  {:ok, nil} | {:error, Snakepit.Error.t()}

Logging configuration for vLLM.

Returns

  • nil

_date_format()

@spec _date_format() :: {:ok, String.t()} | {:error, Snakepit.Error.t()}

Python module attribute vllm.logger._DATE_FORMAT.

Returns

  • String.t()

_format()

@spec _format() :: {:ok, String.t()} | {:error, Snakepit.Error.t()}

Python module attribute vllm.logger._FORMAT.

Returns

  • String.t()

_methods_to_patch()

@spec _methods_to_patch() ::
  {:ok, %{optional(term()) => term()}} | {:error, Snakepit.Error.t()}

Python module attribute vllm.logger._METHODS_TO_PATCH.

Returns

  • %{optional(term()) => term()}

_print_debug_once(logger, msg, opts \\ [])

@spec _print_debug_once(term(), String.t(), keyword()) ::
  {:ok, nil} | {:error, Snakepit.Error.t()}

Logging configuration for vLLM.

Parameters

  • logger (term())
  • msg (String.t())
  • args (term())

Returns

  • nil

_print_info_once(logger, msg, opts \\ [])

@spec _print_info_once(term(), String.t(), keyword()) ::
  {:ok, nil} | {:error, Snakepit.Error.t()}

Logging configuration for vLLM.

Parameters

  • logger (term())
  • msg (String.t())
  • args (term())

Returns

  • nil

_print_warning_once(logger, msg, opts \\ [])

@spec _print_warning_once(term(), String.t(), keyword()) ::
  {:ok, nil} | {:error, Snakepit.Error.t()}

Logging configuration for vLLM.

Parameters

  • logger (term())
  • msg (String.t())
  • args (term())

Returns

  • nil

_should_log_with_scope(scope, opts \\ [])

@spec _should_log_with_scope(
  term(),
  keyword()
) :: {:ok, boolean()} | {:error, Snakepit.Error.t()}

Decide whether to log based on scope

Parameters

  • scope (term())

Returns

  • boolean()

_trace_calls(log_path, root_dir, frame, event)

@spec _trace_calls(term(), term(), term(), term()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}

Logging configuration for vLLM.

Parameters

  • log_path (term())
  • root_dir (term())
  • frame (term())
  • event (term())
  • arg (term() default: None)

Returns

  • term()

_use_color(opts \\ [])

@spec _use_color(keyword()) :: {:ok, boolean()} | {:error, Snakepit.Error.t()}

Logging configuration for vLLM.

Returns

  • boolean()

current_formatter_type()

@spec current_formatter_type() :: {:ok, term()} | {:error, Snakepit.Error.t()}

Python binding for vllm.logger.current_formatter_type.

Returns

  • term()

current_formatter_type(opts)

@spec current_formatter_type(keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
@spec current_formatter_type(term()) :: {:ok, term()} | {:error, Snakepit.Error.t()}

current_formatter_type(arg1, opts)

@spec current_formatter_type(
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec current_formatter_type(term(), term()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}

current_formatter_type(arg1, arg2, opts)

@spec current_formatter_type(term(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
@spec current_formatter_type(term(), term(), term()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}

current_formatter_type(arg1, arg2, arg3, opts)

@spec current_formatter_type(term(), term(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
@spec current_formatter_type(term(), term(), term(), term()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}

current_formatter_type(arg1, arg2, arg3, arg4, opts)

@spec current_formatter_type(term(), term(), term(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
@spec current_formatter_type(term(), term(), term(), term(), term()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}

current_formatter_type(arg1, arg2, arg3, arg4, arg5, opts)

@spec current_formatter_type(term(), term(), term(), term(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
@spec current_formatter_type(term(), term(), term(), term(), term(), term()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}

current_formatter_type(arg1, arg2, arg3, arg4, arg5, arg6, opts)

@spec current_formatter_type(
  term(),
  term(),
  term(),
  term(),
  term(),
  term(),
  keyword()
) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
@spec current_formatter_type(term(), term(), term(), term(), term(), term(), term()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}

current_formatter_type(arg1, arg2, arg3, arg4, arg5, arg6, arg7, opts)

@spec current_formatter_type(
  term(),
  term(),
  term(),
  term(),
  term(),
  term(),
  term(),
  keyword()
) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
@spec current_formatter_type(
  term(),
  term(),
  term(),
  term(),
  term(),
  term(),
  term(),
  term()
) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}

current_formatter_type(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, opts)

@spec current_formatter_type(
  term(),
  term(),
  term(),
  term(),
  term(),
  term(),
  term(),
  term(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}

default_logging_config()

@spec default_logging_config() ::
  {:ok, %{optional(term()) => term()}} | {:error, Snakepit.Error.t()}

Python module attribute vllm.logger.DEFAULT_LOGGING_CONFIG.

Returns

  • %{optional(term()) => term()}

enable_trace_function_call(log_file_path)

@spec enable_trace_function_call(String.t()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}

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.

Parameters

  • log_file_path (String.t())
  • root_dir (term() default: None)

Returns

  • term()

enable_trace_function_call(log_file_path, opts)

@spec enable_trace_function_call(
  String.t(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec enable_trace_function_call(String.t(), term()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}

enable_trace_function_call(log_file_path, root_dir, opts)

@spec enable_trace_function_call(String.t(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}

init_logger(name, opts \\ [])

@spec init_logger(
  String.t(),
  keyword()
) :: {:ok, Vllm.Logger.VllmLogger.t()} | {:error, Snakepit.Error.t()}

The main purpose of this function is to ensure that loggers are

retrieved in such a way that we can be sure the root vllm logger has already been configured.

Parameters

  • name (String.t())

Returns

  • Vllm.Logger.VllmLogger.t()

log_scope(opts \\ [])

@spec log_scope(keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}

Logging configuration for vLLM.

Parameters

  • args (term())
  • kwargs (term())

Returns

  • term()

logger()

@spec logger() :: {:ok, term()} | {:error, Snakepit.Error.t()}

Python module attribute vllm.logger.logger.

Returns

  • term()

suppress_logging()

@spec suppress_logging() :: {:ok, term()} | {:error, Snakepit.Error.t()}

Logging configuration for vLLM.

Parameters

  • level (integer() default: 20)

Returns

  • term()

suppress_logging(opts)

@spec suppress_logging(keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec suppress_logging(integer()) :: {:ok, term()} | {:error, Snakepit.Error.t()}

suppress_logging(level, opts)

@spec suppress_logging(
  integer(),
  keyword()
) :: {:ok, term()} | {:error, Snakepit.Error.t()}