Skip to content

Commit

Permalink
test(project): restore default log level to 'error' (#1085)
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Coulon <[email protected]>
  • Loading branch information
xcoulon authored Sep 23, 2022
1 parent b39e140 commit 8b3c889
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testsupport/log_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ func init() {
func parseLogLevel() log.Level {
var logLevel string
// needed to let ginkgo parse the flag, otherwise, `ginkgo -- --loglevel=...` will fail with `flag provided but not defined: -loglevel`
flag.StringVar(&logLevel, "loglevel", "warn", "log level to set [debug|info|warn|error|fatal|panic]")
flag.StringVar(&logLevel, "loglevel", "error", "log level to set [debug|info|warn|error|fatal|panic]")
// parse with a custom flagset in which all other flags (ginkgo's) are ignored
f := pflag.NewFlagSet("passthroughs", pflag.ContinueOnError)
f.ParseErrorsWhitelist.UnknownFlags = true
f.StringVarP(&logLevel, "loglevel", "l", "warn", "log level to set [debug|info|warn|error|fatal|panic]")
f.StringVarP(&logLevel, "loglevel", "l", "error", "log level to set [debug|info|warn|error|fatal|panic]")
if err := f.Parse(os.Args[1:]); err != nil {
panic(err)
}
Expand Down

0 comments on commit 8b3c889

Please sign in to comment.