-
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]: Nested objects in defaultMeta
won't merge with nested objects in the log meta
#2105
Comments
@MitchellCash Can you try temporarily using 3.7.1 and see if that solves your issue? |
@wbt I pinned to version |
Hmm, that's unfortunate. It might be a good test case for @maverick1872 to have a look at. |
This is by design currently. As it stands the meta implementation doesn't support a deep merge strategy as it's a departure from the current merge strategy. Id like to get add a configuration that allows one to define a merge strategy on a given logger instance but fixing the current issues is higher priority. Unfortunately I'm pretty slammed with other responsibilities right now so I've been unable to diagnose the issues with the latest release let alone investigate new features. I welcome any contributions though! 😁 |
🔎 Search Terms
defaultMeta, nested, object
The problem
When
defaultMeta
sets a nested object it won't be merged with another nested object in the log meta using the same key. Instead, the nested object in the log meta overrides thedefaultMeta
nested object, instead of merging them.This might be by design due to any performance or other concerns of iterating through nested objects, but thought I would raise it nonetheless.
What version of Winston presents the issue?
v3.7.2
What version of Node are you using?
v16.14.1
If this worked in a previous version of Winston, which was it?
No response
Minimum Working Example
Additional information
No response
The text was updated successfully, but these errors were encountered: