-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Feature/#258 log error stack trace #264
Feature/#258 log error stack trace #264
Conversation
StarpTech
commented
Sep 20, 2017
•
edited
edited
IMHO we can do the same thing by adding the standard error serializer, and not logging them in two lines. Ideally the https://github.com/pinojs/pino/blob/master/docs/API.md#errSerializer |
Hi, The options used to create the pino instance is provided by fastify constructor. So you can do this right now! Anyway, I agree with you: we need to figure out how the stack should be logged |
pino-http added the |
@mcollina did you mean this? I updated |
lib/logger.js
Outdated
} | ||
} | ||
return obj | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use pino.stdSerializers.err
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to use it but it creates a hard binding to the module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this same file is already requiring it: https://github.com/StarpTech/fastify/blob/e1bde9c123165b03cd372ceddf97d38d122c59da/lib/logger.js#L9.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |