Skip to content

Commit

Permalink
add log description, remove panic, fatal levels
Browse files Browse the repository at this point in the history
  • Loading branch information
ngtuna committed Dec 7, 2017
1 parent 3d00ee1 commit 565dea1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ Find more information at https://github.com/kubeapps/kubeapps.`,
}

func init() {
RootCmd.PersistentFlags().StringP("verbose", "v", "warning", "Set log level: debug, info, warning, error, fatal, panic")
RootCmd.PersistentFlags().StringP("verbose", "v", "warning", fmt.Sprint("Set log level: debug, info, warning, error.\n"+
"debug: Usually only enabled when debugging. Very verbose logging.\n"+
"info: General operational entries about what's going on.\n"+
"error: Used for errors that should definitely be noted.\n"+
"warning: Non-critical entries that deserve eyes."))
RootCmd.PersistentFlags().Set("logtostderr", "true")
}

Expand All @@ -83,10 +87,6 @@ func logLevel(verbosity string) logrus.Level {
return logrus.DebugLevel
case "error":
return logrus.ErrorLevel
case "fatal":
return logrus.FatalLevel
case "panic":
return logrus.PanicLevel
default:
return logrus.WarnLevel
}
Expand Down

0 comments on commit 565dea1

Please sign in to comment.