fix: Disallow log level 'trace' (#765)

Co-authored-by: Simon Aronsson <simme@arcticbit.se>
pull/770/head
Zois Pagoulatos 4 years ago committed by GitHub
parent eccf87a47d
commit d04d71508f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -25,6 +25,10 @@ func NewNotifier(c *cobra.Command) *Notifier {
}
acceptedLogLevels := slackrus.LevelThreshold(logLevel)
// slackrus does not allow log level TRACE, even though it's an accepted log level for logrus
if len(acceptedLogLevels) == 0 {
log.Fatalf("Unsupported notification log level provided: %s", level)
}
// Parse types and create notifiers.
types, err := f.GetStringSlice("notifications")

Loading…
Cancel
Save