# `ScoutApm.Logging.LogHandler`

Erlang :logger handler for capturing log events and sending them to OTLP.

This handler runs in the client process (the process that calls Logger),
which allows us to directly access Scout APM context from the process dictionary.

## Usage

    # Attach the handler
    ScoutApm.Logging.LogHandler.attach()

    # Detach the handler
    ScoutApm.Logging.LogHandler.detach()

## Configuration

The handler respects the following config options:
- `:logs_enabled` - Must be true for handler to process logs
- `:logs_level` - Minimum level to capture (default: :info)
- `:logs_filter_modules` - List of modules to exclude from capture

# `attach`

```elixir
@spec attach(keyword()) :: :ok | {:error, term()}
```

Attaches the log handler to the Erlang :logger system.
Returns :ok on success, {:error, reason} on failure.

# `attached?`

```elixir
@spec attached?() :: boolean()
```

Checks if the handler is currently attached.

# `detach`

```elixir
@spec detach() :: :ok | {:error, term()}
```

Detaches the log handler from the Erlang :logger system.

# `handler_id`

```elixir
@spec handler_id() :: atom()
```

Returns the handler ID used for registration.

---

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