@youngkiu/pino-slack-webhook
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

ESLint Node.js CI

NPM downloads

@youngkiu/pino-slack-webhook

A Pino v7+ transport to send events to Slack

Installation

npm install --save @youngkiu/pino-slack-webhook

Usage

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!');

test-app.ts

slack-webhook.png

Reference

Package Sidebar

Install

npm i @youngkiu/pino-slack-webhook

Weekly Downloads

222

Version

0.1.2

License

MIT

Unpacked Size

54.6 kB

Total Files

15

Last publish

Collaborators

  • youngkiu