# `Vllm.Logger`
[🔗](https://github.com/nshkrdotcom/vllm/blob/v0.3.0/lib/snakebridge_generated/vllm/logger/__init__.ex#L6)

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.

# `_configure_vllm_root_logger`

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

Logging configuration for vLLM.

## Returns

- `nil`

# `_date_format`

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

Python module attribute `vllm.logger._DATE_FORMAT`.

## Returns

- `String.t()`

# `_format`

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

Python module attribute `vllm.logger._FORMAT`.

## Returns

- `String.t()`

# `_methods_to_patch`

```elixir
@spec _methods_to_patch() ::
  {:ok, %{optional(term()) =&gt; term()}} | {:error, Snakepit.Error.t()}
```

Python module attribute `vllm.logger._METHODS_TO_PATCH`.

## Returns

- `%{optional(term()) => term()}`

# `_print_debug_once`

```elixir
@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`

```elixir
@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`

```elixir
@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`

```elixir
@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`

```elixir
@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`

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

Logging configuration for vLLM.

## Returns

- `boolean()`

# `current_formatter_type`

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

Python binding for `vllm.logger.current_formatter_type`.

## Returns

- `term()`

# `current_formatter_type`

```elixir
@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`

```elixir
@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`

```elixir
@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`

```elixir
@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`

```elixir
@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`

```elixir
@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`

```elixir
@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`

```elixir
@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`

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

# `default_logging_config`

```elixir
@spec default_logging_config() ::
  {:ok, %{optional(term()) =&gt; term()}} | {:error, Snakepit.Error.t()}
```

Python module attribute `vllm.logger.DEFAULT_LOGGING_CONFIG`.

## Returns

- `%{optional(term()) => term()}`

# `enable_trace_function_call`

```elixir
@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`

```elixir
@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`

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

# `init_logger`

```elixir
@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`

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

Logging configuration for vLLM.

## Parameters

- `args` (term())
- `kwargs` (term())

## Returns

- `term()`

# `logger`

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

Python module attribute `vllm.logger.logger`.

## Returns

- `term()`

# `suppress_logging`

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

Logging configuration for vLLM.

## Parameters

- `level` (integer() default: 20)

## Returns

- `term()`

# `suppress_logging`

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

# `suppress_logging`

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
