Ensure --quiet flag is honored

The code to disable logging ran before command line flags are parsed.
Moved them around.

Fixes #45
This commit is contained in:
Søren L. Hansen 2022-08-30 17:02:18 -07:00
parent 94e587399d
commit 7d431a7bd6

View File

@ -64,13 +64,13 @@ func main() {
}
}
utils.ApplyFlags(cliFlags, flagMappings, c, appOptions, backendOptions)
if appOptions.Quiet {
log.SetFlags(0)
log.SetOutput(ioutil.Discard)
}
utils.ApplyFlags(cliFlags, flagMappings, c, appOptions, backendOptions)
if c.IsSet("credential") {
appOptions.EnableBasicAuth = true
}