# Logs

How to read and follow the logs of an environment.


The logs of an environment are read live from Scaleway. Brewless shows the lines and stores none of them; how long they are kept is up to Scaleway.

```bash
brewless logs production
```

| Option | What it does |
| --- | --- |
| `--tail` | Keep following new lines until you stop it |
| `--range=` | How far back to start: `hour`, `day` or `week` |
| `--search=` | Only lines that contain this text |
| `--source=` | Which container or database to read, by its name: `web`, `release`, `worker` or the name of a database. Without it, the web container |

When a release fails while its release commands run, the reason is in the logs of the release container, not the web container:

```bash
brewless logs production --source=release
```

A name the environment does not have is refused with the names it does have.

For example, to follow only the lines that mention a failed payment:

```bash
brewless logs production --tail --search="payment failed"
```

**Logs** in the console shows the same lines, per container or database of the environment.

> [!NOTE]
> A long period can hold more lines than are shown. Narrow the period or search to see the others.
