Skip to content

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

@mwuerstlAtFinch

Description

@mwuerstlAtFinch

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions