# `KapsoEx.Platform.LogSearch`
[🔗](https://github.com/rocket4ce/kapso_ex/blob/v0.1.0/lib/kapso_ex/platform/log_search.ex#L1)

Search the same log events shown in the Kapso logs UI: API logs,
WhatsApp webhook events, flow events and webhook deliveries.

# `result`

```elixir
@type result() :: {:ok, map()} | {:error, KapsoEx.Error.t()}
```

# `catalog`

```elixir
@spec catalog(KapsoEx.Client.t()) :: result()
```

Returns the log sources, supported filter keys and detail fields.

# `search`

```elixir
@spec search(KapsoEx.Client.t(), map() | keyword()) :: result()
```

Searches log events.

Params: `query`, `period` (`"24h"`, `"7d"`, `"context"`), `source`,
`problems_only`, `errors_only`, `limit`, `cursor`, `around`,
`highlight_event_id`, `highlight_resource_id`.

# `search_with_filters`

```elixir
@spec search_with_filters(KapsoEx.Client.t(), map() | keyword()) :: result()
```

Searches log events with structured `filters`, plus the params of
`search/2` in the body. See `catalog/1` for the supported filter keys.

---

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