Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmd/buildctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ func main() {
debugEnabled = context.GlobalBool("debug")
// Use Format flag to control log formatter
logFormat := context.GlobalString("log-format")
if logFormat == "" {
logFormat = os.Getenv("BUILDKITD_LOG_FORMAT")
Copy link
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

}
switch logFormat {
case "json":
logrus.SetFormatter(&logrus.JSONFormatter{})
Expand Down
1 change: 1 addition & 0 deletions cmd/buildkitd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ func main() {
Name: "log-format",
Usage: "log formatter: json or text",
Value: "text",
EnvVar: "BUILDKITD_LOG_FORMAT",
},
cli.StringFlag{
Name: "group",
Expand Down
Loading