Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maxcnunes/winston-slackihook


https://github.com/maxcnunes/winston-slackihook

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

winston-slackihook
==================

Winston Transport for Slack chat integration with incoming webhooks.

Uses the [Incoming WebHooks](https://.slack.com/services/new/incoming-webhook) to send log messages to [Slack](https://slack.com/) through [Wiston](https://github.com/flatiron/winston) library.

It was originally based on [winston-slack](https://github.com/TDASinternal/winston-slack). But different from that it uses [slackihook](https://github.com/keyvanfatehi/slackihook) to send notification messages. Which implements the new Slack's api for **Incoming WebHooks**.

## Install

```js
$ npm install winston-slackihook
```

Also requires install of winston

```js
$ npm install winston
```

## Usage

```js
var winston = require('winston');
var something = require('winston-slackihook').Slack;

winston.add(something, {
// replace it with the url generated from: https://.slack.com/services/new/incoming-webhook
incomingWebhookURL: "https://hooks.slack.com/services/...",
channel: "#test-channel",
username: "ErrorBot",
level: 'error',
handleExceptions : true
});
```