1.0.18 • Published 5 years ago

onio-rest-master v1.0.18

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

Slack Appender for log4js-node

Sends log events to a slack channel. This is an optional appender for use with log4js.

npm install @log4js-node/slack

Configuration

  • type - @log4js-node/slack
  • token - string - your Slack API token (see the slack and slack-node docs)
  • channel_id - string - the channel to send log messages
  • icon_url - string (optional) - the icon to use for the message
  • username - string - the username to display with the message
  • layout - object (optional, defaults to basicLayout) - the layout to use for the message (see layouts).

Example

log4js.configure({
  appenders: {
    alerts: {
      type: '@log4js-node/slack',
      token: 'abc123def',
      channel_id: 'prod-alerts',
      username: 'our_application'
    }
  },
  categories: {
    default: { appenders: ['alerts'], level: 'error' }
  }
});

This configuration will send all error (and above) messages to the prod-alerts slack channel, with the username our_application.

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago