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 TypeError on logging BigInt #1234

Merged
merged 2 commits into from
Nov 22, 2021
Merged

Fix TypeError on logging BigInt #1234

merged 2 commits into from
Nov 22, 2021

Conversation

Nevon
Copy link
Collaborator

@Nevon Nevon commented Nov 22, 2021

Fixes #1233

BigInt doesn't have a toJSON method, because it can't be serialized and then deserialized using the default JSON serializer in Javascript, so tossing a Long into the logger will throw a TypeError.

It's very difficult to trigger this in the application itself. The only way I've seen it happen is by doing manual committing in a weird timing during consumer startup, but in theory it can happen any time we log a Long.

@Nevon Nevon merged commit 191962a into master Nov 22, 2021
@Nevon Nevon deleted the bigint-logging-1233 branch November 22, 2021 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default logger fails to log BigInt
1 participant