-
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
format info object appears to be polluted if the first parameter to logger is an object #1510
Comments
I have a workaround, which seems a little brutal but does the job for me. I simply added this formatter to top of the list:
|
Did a little digging and think I found where this is happening: Lines 172 to 180 in 919ce41
So |
The part of code above is also responsible for other issue: When there is an object that should be stringified using toJSON() method, i.e.
It's context is replaced by
|
That might actually be a slight bug in sequelize too. During the Are you able to call EDIT: ignore me - |
Yes, calling If you check the |
Fixed in #1552 and |
Please tell us about your environment:
winston
version?winston@2
winston@3.1.0
node -v
outputs: 8.11.1What is the problem?
If the first parameter to one of the logger functions (e.g.
logger.info()
) is an object, it appears to pollute theinfo
object during formatting. The following code replicates the issue for me:I get the following output
What do you expect to happen instead?
I would not expect the
with
element to be present in theinfo
object during the second call tologger.info()
The text was updated successfully, but these errors were encountered: