docker_logs
Retrieve container log lines with timestamps and stream names. Narrow results by time window or line count, and follow live output for debugging.
Instructions
Reads what a container printed, line by line: each line carries the stream that wrote it and its own time. An empty list means the window held nothing, not that the read failed, and lines dropped from the middle are counted rather than quietly lost. Narrow the window with since and until instead of raising the count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | No | How many of the last lines to read. Default: 100. | |
| since | No | Only lines written after this: a duration (30s, 10m, 2h, 1d), a date (2026-08-22T10:00:00Z) or a UNIX timestamp. Applied before lines counts them. | |
| until | No | Only lines written before this, written the same way as since. | |
| follow | No | Wait for lines still to come; the call returns what arrived within 10s or 1024KB. | |
| profile | No | Which Docker host, by profile name. Default: the profile marked as default. | |
| project | No | Which compose project. Default: the project of the working directory. A name matching nothing is an error, not a fall back to every container on the host. | |
| service | Yes | Service name as written in the compose file. | |
| compose_path | No | Where the compose file is: the file itself, or the directory holding it. Needed only when no container of the host carries the project label — a project that was never brought up there. A directory holding several compose files is refused with their names rather than guessed through. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | ||
| lines | No | ||
| since | No | ||
| until | No | ||
| follow | No | ||
| legend | No | What the words in this answer mean. A key names the field before the value — "state=running", "containers[].health=unhealthy" — and only the values this answer used are listed. | |
| reason | No | ||
| project | No | ||
| service | No | ||
| truncated | No | ||
| clipped_lines | No | ||
| returned_lines | No | ||
| truncated_reason | No |