-
-
Notifications
You must be signed in to change notification settings - Fork 217
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
backend := pterm.DefaultLogger
logHandler := pterm.NewSlogHandler(backend.WithLevel(pterm.LogLevelDisabled))
logger.Info("Test")When setting the slog handler level to LogLevelDisabled, the message still gets printed.
The bug likely is caused in this if-condition:
Lines 263 to 266 in 4048ff9
| func (l Logger) print(level LogLevel, msg string, args []LoggerArgument) { | |
| if l.Level > level { | |
| return | |
| } |
In this condition, l.Level equals 0, which is smaller than 3 (3 = Info), so the return-clause is skipped and the message gets printed regardless.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working