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
I'm running the sample code under the Combining Formats section. I've created a brand new Node project, and Winston is the only package installed. I created a new index.js file, and it only contains the code in the Combining Formats section. When I execute the code, I see the following log output:
{ level: 'info',
message: 'What time is the testing at?',
label: 'right meow!',
timestamp: '2018-05-10T00:52:02.906Z',
[Symbol(level)]: 'info' }
What do you expect to happen instead?
According to the text in the section, I should see:
{ level: 'info',
message: 'What time is the testing at?',
label: 'right meow!',
timestamp: '2018-05-10T00:52:02.906Z' }
I'm not sure where the [Symbol(level)]: 'info' part is coming from or how to get rid of it. Is the sample output in the section inconsistent with the code? Should I change the configuration? Thank you.
The text was updated successfully, but these errors were encountered:
Update: I've narrowed the issue down to the prettyPrint call. I haven't looked into that function yet, but removing it and replacing it with format.json() causes the logger to output the log message I expect (of course, without the newline whitespace).
My immediate project need is gone now after not using prettyPrint, especially since that was not a requirement for me as I'm pushing my logs to AWS CloudWatch which can format them in the viewer.
However, it still seems that there is something strange about prettyPrint or the documentation. I'm fine closing this issue since I no longer need help, but if it helps to keep this issue open to fix the issue with prettyPrint, that's fine, too.
Please tell us about your environment:
winston
version?winston@2
winston@3
node -v
outputs: v8.10.0What is the problem?
I'm running the sample code under the Combining Formats section. I've created a brand new Node project, and Winston is the only package installed. I created a new
index.js
file, and it only contains the code in the Combining Formats section. When I execute the code, I see the following log output:What do you expect to happen instead?
According to the text in the section, I should see:
I'm not sure where the
[Symbol(level)]: 'info'
part is coming from or how to get rid of it. Is the sample output in the section inconsistent with the code? Should I change the configuration? Thank you.The text was updated successfully, but these errors were encountered: