I'm not sure what traceback refers to, but for me, debug logging with file:line number is essential, and I use the approach here https://github.com/glycerine/vprint
On Thursday, June 22, 2023 at 10:49:31 AM UTC+1 wilk wrote: > There is a proposal to add a trace only opt-in at error level. > Only on this error I like to know the method and line. > > *Apart* to know if it's something useful to add in the standard lib or > not (to don't pollute the github issue), how do you use the traceback in > errors ? > > Do you add a full traceback like with pkg/errors ? > No traceback, decorate the error is enough ? > A mix like the proposal ? > Depends of the project ? > > For me it depends of the project but after using pkg/errors a lot I > tried no traceback at all, it was working and it force me to think two > time how I decorate each error, that's eventually more accurate than a > traceback. And now in few places I see that my decorate looks like a > small traceback "I'm in method X and I call Y: %v" > > Thought ? > > -- > wilk > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/a9910efd-05a8-4523-a27e-4e0573f90a85n%40googlegroups.com.