zerolog
zerolog copied to clipboard
Added multistack logging
There is an issue with the way the MarshalStack is implemented right now. It only prints info on the last stack trace -- which is really unhelpful if you have multiple stacks (i.e. you really want to know where the original stack trace came from).
This pull request adds the ability to log all of the stack traces collected by the errors. It is pretty much there, but I've marked as wip because the exact formatting needs to be determined -- probably better to use an inbuilt encoding mechanism of zerolog (instead of json), but I'm not too familiar with the encoding of zerolog... @rs do you have any suggestions? Thanks!
Actually I was being really dumb, I've worked out how to do the encoding properly now (i.e. without json.Marshal).
@rs I would love to hear your thoughts on this. I am using MarshalMultiStack
from my own fork for now and it has fixed the problem of the incomplete stacktrace from MarshalStack
.
@rs have you had a chance to look at this? Thanks! :)
@rs I'd love to hear your thoughts on this.