Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(project): restore default log level to 'error' #1085

Merged
Merged
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
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