Skip to content
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

Fix logging for objects that define toJSON #916

Merged
merged 5 commits into from
Jul 14, 2021
Merged

Fix logging for objects that define toJSON #916

merged 5 commits into from
Jul 14, 2021

Conversation

joehan
Copy link
Contributor

@joehan joehan commented Jul 14, 2021

Description

Fixes an issue where objects containing members that define their own toJSON function could not be logged correctly. Fixes #907

Code sample

The logger should now work as expected for cases like:
logger.log("something!", {a: new Date()}
logger.log("something!", {a: moment()}

@joehan joehan changed the title Jh take 2 Fix logging for objects that define toJSON Jul 14, 2021
@joehan joehan requested review from mbleigh and inlined and removed request for mbleigh July 14, 2021 17:57
Copy link
Member

@inlined inlined left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛳 it

@joehan joehan merged commit 641cae8 into master Jul 14, 2021
@joehan joehan deleted the jh-take-2 branch July 14, 2021 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

logger crashes on moment.js object ( TypeError: config._d.getTime is not a function )
3 participants