mirror of
https://github.com/containrrr/watchtower.git
synced 2025-03-03 15:32:37 +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)
|
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.
|
// Parse types and create notifiers.
|
||||||
types, err := f.GetStringSlice("notifications")
|
types, err := f.GetStringSlice("notifications")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user