diff --git a/orbit/changes/14657-log-flag b/orbit/changes/14657-log-flag new file mode 100644 index 0000000000..497abca02f --- /dev/null +++ b/orbit/changes/14657-log-flag @@ -0,0 +1 @@ +* Allow to configure the orbit `--log-file` flag via an environment variable `ORBIT_LOG_FILE`. diff --git a/orbit/cmd/orbit/orbit.go b/orbit/cmd/orbit/orbit.go index 3e9f56df12..ab11ff51f0 100644 --- a/orbit/cmd/orbit/orbit.go +++ b/orbit/cmd/orbit/orbit.go @@ -144,8 +144,9 @@ func main() { Usage: "Get Orbit version", }, &cli.StringFlag{ - Name: "log-file", - Usage: "Log to this file path in addition to stderr", + Name: "log-file", + Usage: "Log to this file path in addition to stderr", + EnvVars: []string{"ORBIT_LOG_FILE"}, }, &cli.BoolFlag{ Name: "fleet-desktop",