feat(logging): exposing breadcrumbs gathered with errors.Wrap()/Wrapf()/etc when trySkip() fails#1404
Conversation
| } | ||
| g.log.WithOptions(zap.AddCallerSkip(1)).Info(msg, | ||
| zapPosition(l), | ||
| zap.String("reason_error", reason), |
There was a problem hiding this comment.
This, unfortunately, stripped the msg (and frame) from the errors. %w seems to at least nicely unwrap the msg at least, for a good compromise. The frame might also be valuable, but for a different target user.
There was a problem hiding this comment.
You can use %+v to unwrap full chain of errors if I correctly understand the problem
There was a problem hiding this comment.
I think I tried that also, but it was too verbose. This seemed a good compromise.
|
Please use conventional commit names, like |
faa7401 to
4bf4718
Compare
Sorry about that, I misread the guide on it... |
|
Sorry, it is still not per conventional commits 🙂 https://www.conventionalcommits.org/en/v1.0.0/#summary You are adding a new feature, so you can use prefix For tests, use For updating CI/CD I use |
4bf4718 to
39ab34d
Compare
|
@vingarzan can you please resolve conflicts? Sorry for long responce, will be faster now. |
…()/etc when trySkip() fails The code, very nicely, gathers breadcrumbs as it goes deep in the structures while generating. Unfortunately, since these were not exposed during logging, it was very hard to determine where the issues originated in a complex OAD.
724b7bb to
0dee998
Compare
The code, very nicely, gathers breadcrumbs as it goes deep in the structures while generating. Unfortunately, since these were not exposed during logging, it was very hard to determine where the issues originated in a complex OAD.
Added also a couple of names to some errors, for more "bread-crumbing".