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

#119 Add log level constants #120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kevburnsjr
Copy link

@kevburnsjr kevburnsjr commented Nov 18, 2020

No changes to current package interface.
Adds 4 exported symbols to protect developers from magic numbers.

logger := log.NewFilterLogger(log.NewStdLogger(), log.LevelInfo)

See #119

@mmatczuk
Copy link
Owner

The constants come from zapcore, we could forward them here.

@kevburnsjr
Copy link
Author

kevburnsjr commented Nov 19, 2020

Zapcore's constants are completely different.
https://godoc.org/go.uber.org/zap/zapcore#Level

zapcore   | go-http-tunnel
----------|----------------
debug  -1 | 
info    0 | error 0
warn    1 | info  1
error   2 | debug 2
dpanic  3 | trace 3
panic   4 |

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 this pull request may close these issues.

None yet

2 participants