You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
info: test message my string {"meta":[]}
info: test message 123 {"meta":[]}
info: test message first, second {"meta":{"number":123}}
info: Found error at Tue Jun 12 2018 13:27:06 GMT-0300 (-03) {"meta":[]}
info: Found error at Error: chill winston {"meta":[]}
info: Found error at /WUT/ {"meta":[]}
info: Found error at true {"meta":[]}
info: Found error at 100 {"meta":[]}
info: Found error at 1, 2, 3 {"meta":[]}
As you can see, there are {"meta":[]} on every log entry.
What do you expect to happen instead?
Messages that match size of placeholders and parameters should not print the meta information
The easiest solution would be to delete these two lines in logform/splat, but I'm unsure why they were added since they were not in winston before the refactor. If @indexzero had a good reason to add those lines then it's a different story.
Should the splat format interact with the metadata format? If yes then we have an issue with the metadata key. In the metadata format we use metadata as a key, but in the splat format we use meta as the key. So we get something weird as you can see below. To solve this we could add a METADATA symbol to triple-beam`.
info: test message my string {"metadata":{"meta":[]}}
Then there is the question if the simple format should display the metadata. If not we add the metadata key to the stringifiedRest variable in the simple format.
@ChrisAlderson the question around splat and metadata formats is an interesting question. The challenge is that the additional SPLAT is not an object by definition. It is an ordered list. Not opposed to a METADATA symbol which could help these two formats interop better.
Please tell us about your environment:
winston
version?winston@2
winston@3
What is the problem?
Below is the execution of the following example https://github.com/winstonjs/winston/blob/master/examples/interpolation.js
As you can see, there are
{"meta":[]}
on every log entry.What do you expect to happen instead?
Messages that match size of placeholders and parameters should not print the meta information
Other information
This is a regression of PR #1356
The text was updated successfully, but these errors were encountered: