Skip to content

docs: compose logs update#13803

Open
aevesdocker wants to merge 1 commit into
docker:mainfrom
aevesdocker:logs-update
Open

docs: compose logs update#13803
aevesdocker wants to merge 1 commit into
docker:mainfrom
aevesdocker:logs-update

Conversation

@aevesdocker
Copy link
Copy Markdown
Contributor

What I did

Minor docs update. Closes docker/docs#20712

Related issue

(not mandatory) A picture of a cute animal, if possible in relation to what you did

Signed-off-by: aevesdocker <allie.sadler@docker.com>
@aevesdocker aevesdocker requested a review from a team as a code owner May 21, 2026 13:12
@aevesdocker aevesdocker requested review from glours and ndeloof May 21, 2026 13:12
Copy link
Copy Markdown

@docker-agent docker-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

This is a minor documentation update that adds cross-references to docker container logs --since / --until formats. The change is applied consistently across all three changed files (cmd/compose/logs.go, docs/reference/compose_logs.md, docs/reference/docker_compose_logs.yaml). No issues found.

Copy link
Copy Markdown
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LTGM 👍

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment thread cmd/compose/logs.go
flags.StringVar(&opts.since, "since", "", "Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)")
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)")
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`.")
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`.")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add this all in the flag description? I think we could have some alternatives here; if we add an Examples header in the markdown, and a header that has the right anchor, the docs should create a link to the flag description (similar to https://github.com/docker/cli/blob/v29.5.2/docs/reference/commandline/container_logs.md)

An alternative is to set the ExternalURL annotation; that would allow the docs to link to an alternative URL, which can be pointing to the corresponding flag for docker container logs;
https://github.com/docker/cli-docs-tool/blob/7543983fe39fcedd9182dfbee8824375999f8add/annotation/annotation.go#L19-L20

For an example, see https://github.com/docker/cli/blob/ad776d1e107b0d1cb3559a9c6b6391e11c3c51de/cli/command/image/build.go#L118-L119

	flags.Var(&options.buildArgs, "build-arg", "Set build-time variables")
	flags.SetAnnotation("build-arg", annotation.ExternalURL, []string{"https://docs.docker.com/reference/cli/docker/buildx/build/#build-arg"})

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we still have work to do on the CLI documentation for the accepted formats though https://docs.docker.com/reference/cli/docker/container/logs/#until

(I recall there were some formats that worked, but not intentional, so we need to a tread carefully which formats we want to document).

@thaJeztah
Copy link
Copy Markdown
Member

Gave it a quick go with my suggestions; I'm also opening a PR in docker/cli to allow linking to the other flags (but this will require those changes to be published to docs.docker.com first);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document what format docker compose logs --since takes

3 participants