-
Notifications
You must be signed in to change notification settings - Fork 884
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
logger.setBindings() doesn't clear logger[Symbol(pino.parsedChindings)] #890
Comments
Good spot! The first approach (clearing the cache on setBindings()) is perfect. |
okofish
added a commit
to okofish/pino
that referenced
this issue
Aug 12, 2020
Great, I've submitted #893. |
mcollina
pushed a commit
that referenced
this issue
Aug 13, 2020
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
#754 added a very useful
logger.setBindings()
method. But this doesn't play well with prettifiers, which appear to make use of a cached version of the bindings:Would it be "safe" (performance-wise) to have
logger.setBindings()
automatically clearpino.parserChindings
so that the next log call causes it to update? I think this may be OK since said updating only happens when a prettifier is enabled, so it won't impact production situations where there's no prettifier. Alternatively, could we add an additional method that manually clearspino.parserChindings
?I can submit a PR for either of these approaches; I'm just not sure which is best.
The text was updated successfully, but these errors were encountered: