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

# Logs

> Query stdout, stderr, and platform logs from your runs

Logs from every run are forwarded to Loki and exposed via two endpoints, one for everything you've ever run, one scoped to a specific execution. The platform tags log lines with your `user_id` and the run's `execution_id`, so you only ever see logs you own.

## Per-execution logs

```http theme={null}
GET /api/v2/external/logs/execution/{execution_id}
```

| Query   | Default | Range       | Purpose                       |
| ------- | ------- | ----------- | ----------------------------- |
| `limit` | `1000`  | `1`–`10000` | Maximum log entries to return |
| `hours` | `24`    | `1`–`168`   | Look-back window in hours     |

This is the right endpoint to grep through a single run's output after it finishes, particularly useful when stdout/stderr were too large to surface inline in the run record.

```bash theme={null}
curl "https://api.lyceum.technology/api/v2/external/logs/execution/$EXEC?limit=5000&hours=2" \
  -H "Authorization: Bearer $LYCEUM_API_KEY"
```

## Cross-run logs

```http theme={null}
GET /api/v2/external/logs/user
```

| Query   | Default | Range      | Purpose                       |
| ------- | ------- | ---------- | ----------------------------- |
| `limit` | `100`   | `1`–`5000` | Maximum log entries to return |
| `hours` | `1`     | `1`–`24`   | Look-back window in hours     |

Returns log lines from every run on your account in the window. Useful for spot-checking recent activity or building a basic activity feed for a custom dashboard.

## What's logged

Anything your code writes to stdout or stderr is captured. Lyceum doesn't inject its own log lines into your output; what you `print` is what you get back, plus any platform-level events surfaced as separate log streams.
