internal/testlog: fix level matching

This commit is contained in:
Felix Lange 2024-04-18 00:02:26 +02:00
parent 34aac1d756
commit bc62df2223

View file

@ -58,7 +58,7 @@ func (h *bufHandler) Handle(_ context.Context, r slog.Record) error {
}
func (h *bufHandler) Enabled(_ context.Context, lvl slog.Level) bool {
return lvl <= h.level
return lvl >= h.level
}
func (h *bufHandler) WithAttrs(attrs []slog.Attr) slog.Handler {