Skip to content
New issue

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

Support for more trace levels? #349

Closed
thockin opened this issue Aug 25, 2021 · 3 comments · Fixed by #350
Closed

Support for more trace levels? #349

thockin opened this issue Aug 25, 2021 · 3 comments · Fixed by #350

Comments

@thockin
Copy link
Contributor

thockin commented Aug 25, 2021

Hi, I'd love to do a logr (https://github.com/go-logr/logr) implementation for zerolog, but they have somewhat different philosophies on levels. logr uses strictly numeric levels. In playing with zerolog, it seems I can set the global level to arbitrary values (e.g. -2 as a "more verbose trace"), but I can't use arbitrary levels in WithLevel().

For zap, we made a change that allows semi-arbitrary level numbers, and just bypasses fancy stuff like sampling when those are used.

Before I go and try to make this work in zerolog - is that something you'd be open to? If so, any guidance of preferred impl would be helpful.

@rs
Copy link
Owner

rs commented Aug 27, 2021

There is already a logr implementation here: https://github.com/hn8/zerologr

@thockin
Copy link
Contributor Author

thockin commented Aug 27, 2021 via email

@rs
Copy link
Owner

rs commented Aug 27, 2021

PR welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants