We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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:
LogLevelDisabled
pterm/logger.go
Lines 263 to 266 in 4048ff9
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.
l.Level
0
3
return
The text was updated successfully, but these errors were encountered:
Thanks for reporting the issue! I'll take a look :)
Sorry, something went wrong.
Fix released in v0.12.73 🚀
v0.12.73
That was fast! Thanks 🎉
Successfully merging a pull request may close this issue.
When setting the slog handler level to
LogLevelDisabled
, the message still gets printed.The bug likely is caused in this if-condition:
pterm/logger.go
Lines 263 to 266 in 4048ff9
In this condition,
l.Level
equals0
, which is smaller than3
(3 = Info), so thereturn
-clause is skipped and the message gets printed regardless.The text was updated successfully, but these errors were encountered: