Skip to content

Add BUILDKITD_LOG_FORMAT env var support for log formatting - #6246

Closed
kivarun wants to merge 2 commits into
moby:masterfrom
kivarun:log_format_environ
Closed

Add BUILDKITD_LOG_FORMAT env var support for log formatting#6246
kivarun wants to merge 2 commits into
moby:masterfrom
kivarun:log_format_environ

Conversation

@kivarun

@kivarun kivarun commented Sep 25, 2025

Copy link
Copy Markdown

This change introduces the BUILDKITD_LOG_FORMAT environment variable as an alternative way to set the log-format option.
It makes it easier to configure log formatting when running buildkitd inside Docker containers, where passing CLI flags may be less convenient.

Signed-off-by: michael <gnomino@yandex.ru>
@kivarun
kivarun force-pushed the log_format_environ branch from 0bf3cf2 to f7a8b62 Compare October 3, 2025 09:08
Comment thread cmd/buildctl/main.go
// Use Format flag to control log formatter
logFormat := context.GlobalString("log-format")
if logFormat == "" {
logFormat = os.Getenv("BUILDKITD_LOG_FORMAT")

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.

This change is in buildctl but env is called BUILDKITD

@jsternberg

Copy link
Copy Markdown
Collaborator

Going to close this for now as the PR seems to be abandoned. If you want to try to merge this, please make the appropriate changes and create a new PR. Thanks.

@jsternberg jsternberg closed this Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants