Skip to content

Commit 5196ed6

Browse files
committed
docs: compose logs update
Signed-off-by: aevesdocker <allie.sadler@docker.com>
1 parent 4732a2e commit 5196ed6

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

cmd/compose/logs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ func logsCommand(p *ProjectOptions, dockerCli command.Cli, backendOptions *Backe
6262
flags := logsCmd.Flags()
6363
flags.BoolVarP(&opts.follow, "follow", "f", false, "Follow log output")
6464
flags.IntVar(&opts.index, "index", 0, "index of the container if service has multiple replicas")
65-
flags.StringVar(&opts.since, "since", "", "Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)")
66-
flags.StringVar(&opts.until, "until", "", "Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)")
65+
flags.StringVar(&opts.since, "since", "", "Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes). Accepts the same formats as `docker container logs --since`.")
66+
flags.StringVar(&opts.until, "until", "", "Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes). Accepts the same formats as `docker container logs --until`.")
6767
flags.BoolVar(&opts.noColor, "no-color", false, "Produce monochrome output")
6868
flags.BoolVar(&opts.noPrefix, "no-log-prefix", false, "Don't print prefix in logs")
6969
flags.BoolVarP(&opts.timestamps, "timestamps", "t", false, "Show timestamps")

docs/reference/compose_logs.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ Displays log output from services
55

66
### Options
77

8-
| Name | Type | Default | Description |
9-
|:---------------------|:---------|:--------|:-----------------------------------------------------------------------------------------------|
10-
| `--dry-run` | `bool` | | Execute command in dry run mode |
11-
| `-f`, `--follow` | `bool` | | Follow log output |
12-
| `--index` | `int` | `0` | index of the container if service has multiple replicas |
13-
| `--no-color` | `bool` | | Produce monochrome output |
14-
| `--no-log-prefix` | `bool` | | Don't print prefix in logs |
15-
| `--since` | `string` | | Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes) |
16-
| `-n`, `--tail` | `string` | `all` | Number of lines to show from the end of the logs for each container |
17-
| `-t`, `--timestamps` | `bool` | | Show timestamps |
18-
| `--until` | `string` | | Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes) |
8+
| Name | Type | Default | Description |
9+
|:---------------------|:---------|:--------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------|
10+
| `--dry-run` | `bool` | | Execute command in dry run mode |
11+
| `-f`, `--follow` | `bool` | | Follow log output |
12+
| `--index` | `int` | `0` | index of the container if service has multiple replicas |
13+
| `--no-color` | `bool` | | Produce monochrome output |
14+
| `--no-log-prefix` | `bool` | | Don't print prefix in logs |
15+
| `--since` | `string` | | Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes). Accepts the same formats as `docker container logs --since`. |
16+
| `-n`, `--tail` | `string` | `all` | Number of lines to show from the end of the logs for each container |
17+
| `-t`, `--timestamps` | `bool` | | Show timestamps |
18+
| `--until` | `string` | | Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes). Accepts the same formats as `docker container logs --until`. |
1919

2020

2121
<!---MARKER_GEN_END-->

docs/reference/docker_compose_logs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ options:
4949
- option: since
5050
value_type: string
5151
description: |
52-
Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)
52+
Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes). Accepts the same formats as `docker container logs --since`.
5353
deprecated: false
5454
hidden: false
5555
experimental: false
@@ -82,7 +82,7 @@ options:
8282
- option: until
8383
value_type: string
8484
description: |
85-
Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)
85+
Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes). Accepts the same formats as `docker container logs --until`.
8686
deprecated: false
8787
hidden: false
8888
experimental: false

0 commit comments

Comments
 (0)