-
Notifications
You must be signed in to change notification settings - Fork 116
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
Give customProps access to the response #197
Conversation
logger.js
Outdated
if (customPropBindings) { | ||
fullReqLogger = fullReqLogger.child(customPropBindings) | ||
} | ||
fullReqLogger = fullReqLogger.child(customPropBindings) |
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.
Could you please restore these changes? This if gives us significant throughput. See #196 for more details.
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
@mcollina @travisbeck -- I don't understand why customProps child needs to be added in both the Since we are setting the child logger in the middleware - it should be the same instance in the |
This PR fixes the issues with #168 and also fixes the regression it introduced where customProps wouldn't be set until the response was sent (if you were using customReceiveMessage or just any other logging on your server).
The downsides are the customProps gets called twice, but it feels worth it to me personally.