# Read logs for a computer or database

> See what happened to your resources and why, from the console, the CLI or an agent

> Nevia is in early access for selected teams. The CLI installs with `curl -fsSL https://get.nevia.cloud | sh`, and the MCP server is at https://api.nevia.cloud/mcp. A person signs in once in the browser.
> Setup, sign-in and requesting access: [SKILL.md](https://nevia.cloud/SKILL.md). When Nevia fits and when it doesn't: [why.md](https://nevia.cloud/why.md).

> For the complete documentation index, see [llms.txt](https://nevia.cloud/llms.txt). This page's HTML version: https://nevia.cloud/docs/observability/logs

Logs tell you what happened to a computer or database: when it was created,
branched, slept, woke or was deleted, and the reason when Nevia knows one.
Use them to find out why a resource is asleep, when an agent branched it, or
what changed in a project overnight.

You need any role in the workspace, or access to the project the resource is
in. With access to only some projects, add `--project` with your project to
each command. The examples use a computer named `demo` and the
[CLI](https://nevia.cloud/docs/get-started/install-cli.md).

> **Output lines are coming soon**
>
> Logs hold lifecycle events today. Lines a resource prints, failure events such
> as `oom_killed`, and who caused an event are not recorded yet. See
> [what is available today](https://nevia.cloud/docs/observability/overview.md#what-is-available-today).

## Read recent events

```bash
nevia logs demo
```

The CLI prints the last hour's records for `demo`, oldest first, one per line:
the time in UTC, the resource, the event and what happened in words. With no resource, it prints
every computer and database in the selected workspace.

Widen the window with `--since`, which takes a time ago such as `30m`, `2h` or
`1d`, a date, or an RFC 3339 time:

```bash
nevia logs demo --since 1d
```

A window spans at most 7 days, and records are kept for 7 days. One read shows
the newest 100 records. For an earlier stretch, set `--until` as well.

## Filter by event or project

Pick events with `--event`, once per event:

```bash
nevia logs --event slept --event woke --since 1d
```

Read every resource in a project with `--project`. It includes resources that
were deleted in the window:

```bash
nevia logs --project checkout --since 2h
```

The full list of events and flags is in the
[`nevia logs` reference](https://nevia.cloud/docs/reference/cli/logs.md).

## Follow new records

```bash
nevia logs demo --follow
```

`--follow` prints the window first, then new records as they arrive, until you
press Ctrl-C. In another terminal, run `nevia suspend demo --wait` and a
`slept` record appears. A record that reaches Nevia more than 5 minutes late is
not printed, so read the window again when you need every record.

When a read comes back empty and asks for something Nevia does not record yet,
such as `--type output`, the CLI says it is coming soon instead of reporting a
quiet window.

## In the console

Open **Observability** › **Logs** for the workspace, or the **Logs** tab on a
computer, database or project page. Set the time frame at the top, type in
**Search logs** to match a record's text, event or resource name, and use the
**Records** filter to pick a type or a set of events. Choices that are not
recorded yet are marked **Coming soon**.

## Ask an agent

Over [MCP](https://nevia.cloud/docs/get-started/mcp.md), an agent reads the same records with
`list_logs`:

```text
Why is the computer demo asleep? Check its Nevia logs for the last day.
```

The answer includes a `console_url` the agent can give you to open the same
view. Its `unreported` field names the events and streams Nevia does not
record yet. See the [MCP reference](https://nevia.cloud/docs/reference/mcp.md#logs-metrics-and-destinations)
and [`GET /v1/logs`](https://nevia.cloud/docs/reference/api/observability/listLogs.md).
