Slack-Winston in Node not working

316 views Asked by At

Has anyone ran the code in npm for slack-wilson lately? It looks like this:

var winston = require('winston'), slackWinston = require('slack-winston').Slack;
var options = {
  domain: '<domain>',
  token: '<apiToken>',
  channel: 'my-sweet-channel',
  level: 'warn'
}

winston.add(slackWinston, options);

Then I try this:

winston.log('warn', 'Node test');

For some reason, I just can't get this to send messages to Slack. Am I missing something?

1

There are 1 answers

0
jblancogl On

You're not missing anything but the package that you've used is out of date. I recommend you this other package winston-slacker