gleidsonf / winston-rocket-chat

Winston Transport for Slack chat integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Winston Transport for Rocket Chat chat integration.

npm install --save winston-rocketchat-transport

Basic transport that works just like all other winston transports. Sends logged messages to a specified Slack chat channel.

Configuration options:

  • webhook_url: required The webhook URL, something like https://yourworkspace.rocket.chat/hooks/XXXXXXXXX/YYYYYYYYY/ZZZZZZZZZZZZZZZZZZZZZZZZ
  • level: If specified, this logger will only log messages at the specified level of importance and more important messages
  • custom_formatter: a function (level, msg, meta) which returns a Slack payload object

var winston = require('winston');
var RocketChat = require('winston-rocketchat-transport');

winston.add(RocketChat, {
    webhook_url: "https://hooks.slack.com/services/XXXXXXXXX/YYYYYYYYY/ZZZZZZZZZZZZZZZZZZZZZZZZ",
    level: 'error',
    handleExceptions: true
});

About

Winston Transport for Slack chat integration

License:MIT License


Languages

Language:JavaScript 100.0%