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
constdata={'message':'hello'}logger.log(data)// now data contains "level":"info"
.info(), and probably other methods modify original object when the object contains 'message' field.
This is unfortunate because a user might be unaware of such behaviour, and can easily overlook this moment, which would lead to hard-to-find problems.
Possible fix:
Leave everything as it is (as user expect to pass config object to the logging method), but clone incoming object.
winston version - (3.2.1)
platform: all
languages: all
grimurd, brandonryan, ajwestgerdes, ntellison, adabir2 and 8 morePanAeon, mum-never-proud, PezeM, trekze, clintonb and 2 more