-
Notifications
You must be signed in to change notification settings - Fork 46
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
pino-colada swallows errors #21
Comments
@toddself so I get this with |
@toddself i've been thinking a bit more about getting to display this. When you do send over a Pino basically flattens out the object you send over in the log. So if I were to {
"pid":18802,
"hostname":"Irinas-MacBook-Pro.local",
"name":"merry",
"level":30,
"time":1507229693877,
"msg":"It login",
"parent":"merry:ctx",
"cute":"floof",
"v":1
} I think what we can do as the first thing is displaying the stack trace when we just log error objects, kind of the way it's requested in #17. The other thing I've been thinking of is possibly be able to work with The other thing I was thinking about is formatting the error messages a bit more. There are a few types of errors we work with, the ones that throw definitely need to have the entire trace. but if you're just working with a syntax error, you just need to know the file name, the line number and the type of error ( LMK what you think! |
@lrlna any thoughts on this? having the same issue |
I just wanted to put this out there that, while not well-documented, pino-colada will dump an error if there is an "err" key in the pino logs. So if you log your errors like so, then pino-colada will show the error. For example: logger.fatal({err: err}, 'Uncaught Exception thrown'); I can see about adding some documentation about this behavior to the readme and send in a PR |
I noticed that, albeit old, issue lrlna#21 talks about pino-colada swallowing errors. This simply isn't true in the latest releases of pino-colada. Therefore, I have added some documentation to the readme that explains the format and where each of the displayed items is coming from within the log messages. This closes lrlna#21 Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
I noticed that, albeit old, issue #21 talks about pino-colada swallowing errors. This simply isn't true in the latest releases of pino-colada. Therefore, I have added some documentation to the readme that explains the format and where each of the displayed items is coming from within the log messages. This closes #21 Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
If you log with
log.fatal(err, 'something went wrong')
you only see `something went wrong' in your log. It would be better if you got your stacktrace so you can see where the error occurred. (It does seem to log objects given post the error message, just not pre)The text was updated successfully, but these errors were encountered: