Skip to content

Instantly share code, notes, and snippets.

@mcollina
Created March 13, 2023 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcollina/5c65cc79ebfcd25c6378f0839e615e3d to your computer and use it in GitHub Desktop.
Save mcollina/5c65cc79ebfcd25c6378f0839e615e3d to your computer and use it in GitHub Desktop.
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