# ed machines docker compose logs

> Streams the logs of every container in a compose project.

- Canonical URL: https://getedith.pro/docs/cli/machines-docker/compose-logs
- Updated: 2026-12-02

Streams the logs of every container in a compose project.

```
ed machines docker compose logs [--tail <n>] [--follow] [--json] <machine> <project>
```

## Arguments

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `<machine>` | machine name, ssh alias, id, or any unambiguous prefix | required | Which machine to ask. |
| `<project>` | compose project name, exactly as `compose ls` prints it | required | Whose logs to stream. |

## Options

| Name | Type / values | Default | What it does |
| --- | --- | --- | --- |
| `--tail` | integer, 0 or more | `200` | How many trailing lines to show, per service. |
| `--follow`, `-f` | flag | off | Keep streaming until interrupted. |
| `--json` | flag | off | Capture the bounded log and print one JSON document. Cannot be combined with `--follow`. |
| `--help`, `-h` | flag | off | Print the help for this command on stdout and exit 0. |

Unlike `ed machines docker logs` there are no timestamps: compose prefixes each
line with the service name instead. `--json` waits for that bounded log, then
prints `{"machine","project","lines"}`.

## Examples

```
ed machines devbox docker compose logs noveum-local-db
ed machines devbox docker compose logs noveum-local-db --tail 20
ed machines devbox docker compose logs noveum-local-db --tail 0 --follow
```

## Behaviour notes

The remote command is `docker compose -p <project> logs --tail <n> [-f]`, after
the same project check the other compose verbs make, so an unlisted project
exits 3 before anything streams. `--tail` is validated first and a negative
value exits 2.

Without `--json` this is a passthrough: stdout and stderr stay separate, there
is no timeout, and the remote exit code becomes yours. `--json` cannot follow,
and a remote failure on that path exits 1.

## Where to go next

- [`ed machines docker`](https://getedith.pro/docs/cli/machines-docker), the rest of this group
- [All `ed` commands](https://getedith.pro/docs/cli)

## Get Edith

Edith is a native Mac app for macOS 14 or later on Apple silicon with 100+ extensions, the `ed` command line and an MCP server. $35 once for one Mac, plus $7 for each additional Mac, with no subscription and a 30-day refund.

- [Buy Edith](https://getedith.pro/pricing): $35 once for one Mac, plus $7 for each additional Mac
- [Download Edith](https://getedith.pro/download): the installer, or Homebrew
