A Pino v7+ transport to send events to Slack
npm install --save @youngkiu/pino-slack-webhook
import pino from 'pino'
const logger = pino({
transport: {
target: '@youngkiu/pino-slack-webhook',
level: 'info',
options: {
webhookUrl: 'https://hooks.slack.com/services/xxx/xxx/xxx',
channel: '#pino-log',
username: 'webhookbot',
icon_emoji: ':ghost:'
}
}
})
logger.info('test log!');