1.2.0 • Published 5 years ago

@xanthous/log4js-to-slack v1.2.0

Weekly downloads
50
License
Apache-2.0
Repository
github
Last release
5 years ago

Slack Appender for log4js-node

npm install @xanthous/log4js-to-slack

Configuration

  • type - @xanthous/log4js-to-slack
  • url - string - your slack incomeWebhook url.
  • layout - object (optional, defaults to basicLayout) - the layout to use for the message (see layouts).

Example

log4js.configure({
  appenders: {
    alerts: {
      type: '@xanthous/log4js-to-slack',
      url: 'https://xxxxxx.xxx/xxx',
    }
  },
  categories: {
    default: { appenders: ['alerts'], level: 'error' }
  }
});