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

Wrong line reported #13

Closed
ralf-cestusio opened this issue Dec 19, 2019 · 0 comments · Fixed by #14
Closed

Wrong line reported #13

ralf-cestusio opened this issue Dec 19, 2019 · 0 comments · Fixed by #14

Comments

@ralf-cestusio
Copy link

With the changes to fix #6 now creating loggers using WithName or WithValues now skips to many levels of callstack
e.g.

log = zapr.NewLogger(zapLog).WithValues("version", Version).WithName("test")
log.V(0).Info("Initializing")

now prints

{"level":"info","ts":1576782453.943943,"logger":"test","caller":"runtime/asm_amd64.s:1357","msg":"Initializing","version":""}```

AddCallerSkip should only skip a level on a "root" logger


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.

1 participant