go-logr/zerologr

how to change loglevel so i can enable or disbale some log?

Closed this issue · 2 comments

how to change loglevel so i can enable or disbale some log?

Use zerolog as usual: zerolog.SetGlobalLevel(zerolog.InfoLevel) where zerolog.InfoLevel is the minimum level to log.

https://go.dev/play/p/p3l4xpRe_C0
https://pkg.go.dev/github.com/rs/zerolog#SetGlobalLevel

https://go.dev/play/p/xWCGpd0lvzj

pohly commented

I think this answered the question, closing.