compose/docs/reference/compose_logs.md
Sebastiaan van Stijn 39ee1d02b6
Some checks failed
ci / validate (lint) (push) Has been cancelled
ci / validate (validate-docs) (push) Has been cancelled
ci / validate (validate-go-mod) (push) Has been cancelled
ci / validate (validate-headers) (push) Has been cancelled
ci / binary (push) Has been cancelled
ci / bin-image-test (push) Has been cancelled
ci / test (push) Has been cancelled
ci / e2e (plugin, oldstable) (push) Has been cancelled
ci / e2e (standalone, oldstable) (push) Has been cancelled
ci / e2e (plugin, stable) (push) Has been cancelled
ci / e2e (standalone, stable) (push) Has been cancelled
docs-upstream / docs-yaml (push) Has been cancelled
merge / bin-image-prepare (push) Has been cancelled
merge / module-image (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
ci / binary-finalize (push) Has been cancelled
ci / coverage (push) Has been cancelled
ci / release (push) Has been cancelled
docs-upstream / validate (push) Has been cancelled
merge / bin-image (push) Has been cancelled
merge / desktop-edge-test (push) Has been cancelled
docs: compose logs: add more links for flag descriptions
follow-up to 7eeb7de7a2, adding more
links now that the CLI reference for docker logs has anchors for them.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-06-10 09:36:31 +02:00

25 lines
3.3 KiB
Markdown

# docker compose logs
<!---MARKER_GEN_START-->
Displays log output from services
### Options
| Name | Type | Default | Description |
|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------|:--------|:-----------------------------------------------------------------------------------------------|
| `--dry-run` | `bool` | | Execute command in dry run mode |
| [`-f`](https://docs.docker.com/reference/cli/docker/container/logs/#follow), [`--follow`](https://docs.docker.com/reference/cli/docker/container/logs/#follow) | `bool` | | Follow log output |
| `--index` | `int` | `0` | index of the container if service has multiple replicas |
| `--no-color` | `bool` | | Produce monochrome output |
| `--no-log-prefix` | `bool` | | Don't print prefix in logs |
| [`--since`](https://docs.docker.com/reference/cli/docker/container/logs/#since) | `string` | | Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes) |
| [`-n`](https://docs.docker.com/reference/cli/docker/container/logs/#tail), [`--tail`](https://docs.docker.com/reference/cli/docker/container/logs/#tail) | `string` | `all` | Number of lines to show from the end of the logs for each container |
| [`-t`](https://docs.docker.com/reference/cli/docker/container/logs/#timestamps), [`--timestamps`](https://docs.docker.com/reference/cli/docker/container/logs/#timestamps) | `bool` | | Show timestamps |
| [`--until`](https://docs.docker.com/reference/cli/docker/container/logs/#until) | `string` | | Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes) |
<!---MARKER_GEN_END-->
## Description
Displays log output from services