-
Notifications
You must be signed in to change notification settings - Fork 937
Open
Description
Issue description
Atm pino uses safe-stable-stringify that is configured with bigint: true to serialize values when JSON.stringify fails with errors. It can lead to tricky behavior, e.g.:
- Tricky
BigIntvalues displayed incorrectly pino-pretty#633 - if too big number gets logged as "number", it might fail to be correctly parsed in some 3rd party systems (e.g. in logging providers)
Suggestion
It would be nice to have some sort of bigint: replacer | false option in pino configuration, that would:
- when
false: disable any serialization ofbigintand re-throw error fromJSON.stringify, sopinousers are explicitly warned and can decide how to serializebigint - when no value - use some default behavior (now - serializing to "number")
- when custom replacer is provided - use it
TechGeorgii and ivan-shnurchenko-swap
Metadata
Metadata
Assignees
Labels
No labels