Since we installed the most recent version of this library, we've been seeing metadata from log lines getting merged (see issue on logdna-winston). I believe this is due to this change from #66.
The problem with this is that message.meta is a reference to this._meta (assigned here), which is the default metadata object for all log lines. So the line above actually merges opts.meta into the default metadata object every time the log function is called, causing the default metadata object to grow in size and contain all keys from all previous log lines.
I'll submit a PR for this- I think the easy solution is to change the above line to
Since we installed the most recent version of this library, we've been seeing metadata from log lines getting merged (see issue on logdna-winston). I believe this is due to this change from #66.
The line that was added is:
The problem with this is that
message.meta
is a reference tothis._meta
(assigned here), which is the default metadata object for all log lines. So the line above actually mergesopts.meta
into the default metadata object every time the log function is called, causing the default metadata object to grow in size and contain all keys from all previous log lines.I'll submit a PR for this- I think the easy solution is to change the above line to