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

# Log limits

> Configure how many lines the API returns in the initial tail request that backs the snapr log viewers.

`server.logLimits` controls how many lines the API returns in the **initial** tail request that backs the log viewer. It sets the default value of the `?tail=N` query parameter on `/api/v1/logs/system` and `/api/v1/jobs/{name}/logs`. Once the UI has the initial slice, it opens an SSE stream and appends every new line as it lands — there is no client-side cap.

<Note>
  This block does **not** size the on-disk log files. See [Logs](/configuration/logs) for path, rotation, and
  per-job/system toggles.
</Note>

## Options

| Option       | Type | Required | Default | Description                             |
| ------------ | ---- | -------- | ------- | --------------------------------------- |
| `jobLogs`    | int  | No       | `10000` | Initial tail length per job log viewer. |
| `systemLogs` | int  | No       | `10000` | Initial tail length for the system log. |

A client can request fewer lines with `?tail=N`. Requests above 50,000 are clamped server-side so a single response never reads millions of lines off disk in one go.

## Example

```yaml snapr.yaml theme={null}
server:
  logLimits:
    jobLogs: 5000
    systemLogs: 20000
```

## Edge cases

* Setting either field to `0` falls back to the default (10,000). Use a small positive number to actually shrink the initial tail.
* The hard server-side cap of 50,000 is independent of these defaults. Even an explicit `?tail=999999` is clamped to 50,000.
