Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added multistack logging #144

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Added multistack logging #144

wants to merge 3 commits into from

Conversation

mec07
Copy link

@mec07 mec07 commented Mar 21, 2019

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!

pkgerrors/stacktrace_test.go Outdated Show resolved Hide resolved
@mec07
Copy link
Author

mec07 commented Mar 21, 2019

Actually I was being really dumb, I've worked out how to do the encoding properly now (i.e. without json.Marshal).

@mec07 mec07 changed the title Added multistack logging -- wip Added multistack logging Mar 22, 2019
@mec07
Copy link
Author

mec07 commented Mar 22, 2019

@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.

@mec07
Copy link
Author

mec07 commented Mar 29, 2019

@rs have you had a chance to look at this? Thanks! :)

@mec07
Copy link
Author

mec07 commented Apr 8, 2019

@rs I'd love to hear your thoughts on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant