You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.
First of all, thanks for creating and sharing a wonderful library!
I think a stack trace with an error message is a big help for debugging, but I also want variable values at the stack where the error occurred. I would like to log those values at the higher stack where I received the error.
So how about adding something like NewWithFields or WrapWithFields?
Thank you for raising this feature request. I believe this is a duplicate of #34.
I believe I understand what you are asking for, but as I concluded in issue #34 such a feature could not be added without creating a mechanism for state to be passed via a side channel in the error's context.
I do not disagree that this would not be useful, I'm more partial to this idea, moreso than structured logging, but I have decided to not implement this feature at this time as I am concerned that it would be abused.
First of all, thanks for creating and sharing a wonderful library!
I think a stack trace with an error message is a big help for debugging, but I also want variable values at the stack where the error occurred. I would like to log those values at the higher stack where I received the error.
So how about adding something like
NewWithFields
orWrapWithFields
?I implemented a proof of concept at Comparing pkg:a2d6902c6d2a2f194eb3fb474981ab7867c81505...hnakamur:add_fields · pkg/errors
Could you tell me what do you think?
Thanks!
The text was updated successfully, but these errors were encountered: