Created
March 13, 2023 17:44
-
-
Save mcollina/5c65cc79ebfcd25c6378f0839e615e3d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const pinoStdSerializers = require('pino-std-serializers') | |
const logger = require('pino')({ | |
serializers: { | |
error: pinoStdSerializers.err | |
} | |
}) | |
try { | |
throw new Error('kaboom') | |
} catch (error) { | |
logger.error({ error }, 'something went wrong') | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment