npm install @serby/logger-sentry-processor
yarn add @serby/logger-sentry-processor
const createLogger = require('@serby/logger')
const createSentryProcessor = require('@serby/logger-sentry-processor')
const Sentry = require('@sentry/node')
const createStdOutProcessor = createLogger.createStdOutProcessor
const logger = createLogger('app', {
level: info,
processors: [
createStdOutProcessor(),
{ processor: createSentryProcessor(Sentry), level: 'warn' }
]
})
Paul Serby follow me on twitter
Licensed under the ISC