charmbracelet / log

A minimal, colorful Go logging library 🪵
MIT License
2.4k stars 67 forks source link

Allow `SetLevel` to set a level that mutes all logs (not just up to Fatal) #145

Open tonglil opened 2 months ago

tonglil commented 2 months ago

Is your feature request related to a problem? Please describe. I want to be able to call SetLevel and turn off all logging for the logger.

Describe the solution you'd like SetLevel(level.Off) or documented method of doing this.

Describe alternatives you've considered I've looked through godocs and issues and cannot find a way to do this with the keywords: off, noop, disable, all

Additional context n/a

aymanbagabas commented 2 months ago

You could use Level(math.MaxInt)