diff --git a/level.go b/level.go index 575065b..2bc6c4e 100644 --- a/level.go +++ b/level.go @@ -19,7 +19,9 @@ var ( Warning = Level{3} Error = Level{4} Critical = Level{5} - disabled = Level{6} // It shouldn't be possible to define a message at this level. + // It shouldn't be possible to define a message at this level. Filtering at this level should + // mean no messages ever get through. + Disabled = Level{6} ) func (l Level) isNotSet() bool { diff --git a/reporting-rules.go b/reporting-rules.go index d930d95..7aa67cd 100644 --- a/reporting-rules.go +++ b/reporting-rules.go @@ -53,7 +53,7 @@ func parseRuleString(s string) (_ Rule, ok bool, _ error) { level, ok, err = levelFromString(ss[1]) if !ok { // blah= means disable the name, but just blah means to always include it - level = disabled + level = Disabled } if err != nil { return nil, false, fmt.Errorf("parsing level %q: %w", ss[1], err) diff --git a/slog.go b/slog.go index 1b0bbde..26848a9 100644 --- a/slog.go +++ b/slog.go @@ -20,7 +20,7 @@ func toSlogLevel(level Level) (slog.Level, bool) { return slog.LevelError, true case Critical: return slog.LevelError + 1, true - case disabled: + case Disabled: return slog.LevelDebug - 1, false default: panic(level)