mirror of
https://github.com/containrrr/watchtower.git
synced 2024-12-12 09:04:17 +02:00
fix: Disallow log level 'trace' (#765)
Co-authored-by: Simon Aronsson <simme@arcticbit.se>
This commit is contained in:
parent
eccf87a47d
commit
d04d71508f
@ -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…
Reference in New Issue
Block a user