gyselroth / balloon-client-desktop

balloon desktop client for Windows, Mac OS X and Linux
GNU General Public License v3.0
10 stars 3 forks source link

Logger can't serialize BigInt II #229

Open pixtron opened 4 years ago

pixtron commented 4 years ago

Describe the bug

If a BigInt is logged logger throws TypeError: Do not know how to serialize a BigInt

To Reproduce

logger.info('Logging BigInt', {number: BigInt('32')});

Expected behavior

Should Serialize bigInt to string.

Environment

Additional context

Also see: #228

Uncaught TypeError: Do not know how to serialize a BigInt
    at JSON.stringify (<anonymous>)
    at Format.transform (/Users/.../balloon-client-desktop/app/lib/logger-factory.js:21)
    at Format.transform (/Users/.../balloon-client-desktop/node_modules/logform/combine.js:20)
    at File._write (/Users/.../balloon-client-desktop/node_modules/winston-transport/index.js:90)