> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gatelit.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Logs

> View and filter request logs. Every gateway request is logged with model, latency, cost, and status.

The gateway logs every request to Supabase. You can view, filter, and search logs in the dashboard under **Logs**.

## What's logged

| Field       | Description                                                                |
| ----------- | -------------------------------------------------------------------------- |
| Request ID  | Unique identifier — use for debugging specific requests                    |
| Timestamp   | When the request was received                                              |
| Model       | The model that responded (may differ from requested if fallback triggered) |
| Status      | `success` or `error`                                                       |
| Auth mode   | `Bearer`, `GatelitSigned`, or `GatelitKey`                                 |
| User / Org  | The authenticated subject and organisation                                 |
| Tokens      | Input, output, and total token counts                                      |
| Cost        | Estimated cost in USD                                                      |
| Latency     | Total round-trip time in milliseconds                                      |
| Prompt ID   | Which saved prompt this request was linked to                              |
| End user ID | The `endUserId` passed in the request                                      |

## Filtering

Filter logs by:

* **Date range** — last hour, 24h, 7d, or custom
* **Status** — success or error
* **Model** — filter to a specific provider/model
* **Org** — filter by organisation (admin only)
* **End user** — filter by the `endUserId` header value
* **Search** — full-text search across request bodies and responses

## Streaming view

The logs page supports a live streaming view — new requests appear as they're logged, useful for debugging during development.

## Cost tracking

The gateway estimates cost using the model catalog's pricing data. This is an estimate, not billing-grade — use your provider's dashboard for exact numbers.

Cost is calculated as:

```
cost = input_tokens × input_price_per_1k + output_tokens × output_price_per_1k
```

Prices are stored in the model catalog and updated when the catalog syncs.

## Request body inspection

Click any log entry to see the full request and response payloads. This is useful for:

* Debugging prompt variable interpolation
* Inspecting structured output results
* Verifying fallback chain behaviour
* Checking what the gateway sent to the upstream provider

## Retention

Logs are stored in Supabase. Retention depends on your Supabase plan and database size. For high-volume deployments, consider archiving older logs to external storage.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/gatelit/images/dashboard/logs.png" alt="Request logs" />
</Frame>
