-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Bug]: default metadata is not added on log message of profiler #2162
Comments
Does using v3.7.0 (specifically) happen to fix the issue? There were a bunch of metadata changes in that one that were quickly reverted in 3.7.1 but it'd be good to know if they address this. |
I have same issue: |
The issue is reported in the current version; the ask was to see if pinning specifically to v3.7.0 fixes the issue or not. |
I tried to, but it is not present in npm anymore: |
Try 3.7.1 - looks like that has the same potential fix, reverted by 3.7.2 |
Yup, 3.7.1 works |
@maverick1872 FYI |
I need to set aside some time to sort through all this again. Maybe publish a RC version that people can leverage in the meantime and report issues on? |
You can treat 3.7.1 as that RC, but a failing one as described in #2103... |
🔎 Search Terms
metadata profiler
The problem
When logging a message with the profiler, the default meta data of the logger instance is not added to the log message.
It is calling
this.logger.write()
directly, and it should have the added default metadata as well.I worked around it by adding the defaultMeta myself:
profiler.done({ message: "Finished complete request", ...logger.defaultMeta });
What version of Winston presents the issue?
v3.8.1
What version of Node are you using?
v16.16.0
If this worked in a previous version of Winston, which was it?
No response
Minimum Working Example
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: