codehakase / slack-logrus

:memo::memo: An Intuitive Logrus Hook for Slack
6 stars 3 forks source link

Hook WithLevels logic is backwards - Setting AllLevels when WithLevels != nil #2

Open mwuerstlAtFinch opened 3 years ago

mwuerstlAtFinch commented 3 years ago

The slacklogrus.go Levels() func is returning logrus.AllLevels when a WithLevel value was set. The func condition should be: // Levels sent to slack func (h *Hook) Levels() []logrus.Level { if h.WithLevels == nil { return logrus.AllLevels } return h.WithLevels }

dwburke commented 3 years ago

looks like a new version tag just needs created... this was fixed a year and a week ago