add quiet flag to disable logging

This commit is contained in:
Steve Biedermann 2021-11-09 17:23:04 +01:00
parent f157dbe9d3
commit 4109b117fe
2 changed files with 7 additions and 0 deletions

View file

@ -4,6 +4,7 @@ import (
"context"
"fmt"
"log"
"io/ioutil"
"os"
"os/signal"
"strings"
@ -63,6 +64,11 @@ func main() {
}
}
if appOptions.Quiet {
log.SetFlags(0)
log.SetOutput(ioutil.Discard)
}
utils.ApplyFlags(cliFlags, flagMappings, c, appOptions, backendOptions)
if c.IsSet("credential") {