Open sruehl opened 6 months ago
And for clarification: The first .Caller()
is set on the root logger to always display caller lines and the second one is used in util functions to get the right line number.
or in other words, it seems like the order is wrong for caller (ref https://github.com/rs/zerolog/issues/40#issuecomment-371180715)
when using the
.Caller
like thissrc: https://go.dev/play/p/nyLsISEzVhV we are getting this output:
as you can see the second skip set in the
UtilSomething
funktion is getting put to the right and therefore when collapsing using the wrong line number. Is that a issue in zerolog or a missunderstanding how to use the API for such a case?