Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.
This repository was archived by the owner on Dec 17, 2025. It is now read-only.

Setting notification-level to trace disables notifications #759

@piksel

Description

@piksel

This is caused by the first check permitting "trace" as it's a valid logrus level:

level, _ := f.GetString("notifications-level")
logLevel, err := log.ParseLevel(level)
if err != nil {
log.Fatalf("Notifications invalid log level: %s", err.Error())
}

...but then when grabbing all levels above it at:

acceptedLogLevels := slackrus.LevelThreshold(logLevel)

it uses the AllLevels slice from slackrus, which doesn't contain Trace:
https://github.com/johntdyer/slackrus/blob/f7aae3243a0786c5a974bce71ed951c459876e64/levels.go#L8-L15

...which means that it will return an empty array of accepted levels:
https://github.com/johntdyer/slackrus/blob/f7aae3243a0786c5a974bce71ed951c459876e64/levels.go#L17-L25

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions