Sends logged messages to a specified slack chat channel
Winston Transport for Slack chat integration
$ npm install winston-slack
Also requires install of winston
$ npm install winston
sub-domain of the slack instance
domain: "yourcompany"
token given by the slack integration API
apiToken: "j7w7tjBMdytjXzEZu9HQooni"
the channel to talk in
channel: "#test-channel"
name displayed in the chat channel. default "winston-slack"
username: ErrorBot
the level of verbosity
level: "error"
in javascript:
var winston = require('winston');
var wslack = require('winston-slack').Slack;
winston.add(wslack, {
domain: "yourcompany",
apiToken: "j7w7tjBMdytjXzEZu9HQooni",
channel: "#test-channel",
username: "ErrorBot",
level: 'error',
handleExceptions : true
});
in coffeescript:
winston = require 'winston'
wslack = require 'winston-slack'
.Slack
winston.add wslack,
domain: "yourcompany"
apiToken: "j7w7tjBMdytjXzEZu9HQooni"
channel: "#test-channel"
username: "ErrorBot"
level: 'error'
handleExceptions : true