# winston-bishop-slack

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

Latest version **0.2.1** (published 2014-12-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install winston-bishop-slack
pnpm add winston-bishop-slack
yarn add winston-bishop-slack
bun add winston-bishop-slack
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2014-12-05 |
| First published | 2014-12-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.6.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Brian Dentino |
| Maintainers | bdentino |
| Keywords | logging, sysadmin, tools, winston, slack, log, logger |

## Links

- npm: https://www.npmjs.com/package/winston-bishop-slack
- Repository: https://github.com/lapwinglabs/winston-bishop-slack
- Issues: https://github.com/lapwinglabs/winston-bishop-slack/issues
- npm.io page: https://npm.io/package/winston-bishop-slack

## Dependencies (3)

- [winston](https://npm.io/package/winston.md) ^0.7.3
- [extend.js](https://npm.io/package/extend.js.md) 0.0.2
- [superagent](https://npm.io/package/superagent.md) ^0.21.0

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 0.2.1 (latest) — 2014-12-05
- 0.2.0 — 2014-12-05

## README

###Winston Transport for Slack chat integration

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

First install winston...
    
    $ npm install winston

Then install winston-bishop-slack

    $ npm install winston-bishop-slack

#####Additonal Options:

* **webhook_url:** *(required) url for your integration (provided by the slack API)*
* **icon_url:** *avatar of the message 'sender' as it appears in slack*
* **channel:** *channel on which the sent message will appear in slack*
* **username:** *name displayed in the chat channel. default "Winston Bishop"*

<code>
    var winston = require('winston');
    var slack = require('winston-bishop-slack').Slack;
    
    winston.add(slack, {
      webhook_url: "https://hooks.slack.com/services/...",
      icon_url: "https://stagefisher.s3.amazonaws.com/images/character/image/519b31da5bf1614f8100000e/Winston-Bishop-New_Girl.jpg",
      channel: "#winston",
      username: "Winston Bishop",
      level: 'error',
      handleExceptions: true,
      customFormatter: function(level, message, meta) {
        return { attachments: [ {
          fallback: "Urgent announcement regarding my cat Ferguson",
          pretext: "Urgent announcement regarding my cat Ferguson",
          color: '#D00000',
          fields: [{
            title: util.format(":scream_cat: %s", message),
            value: meta.detail,
            short: false
          }]
        }]}
      }
    })
  
    winston.error('Ferguson Ran Away!', { detail: "He was last seen at 3pm on Tuesday" }, 
      function(err, res) {
        console.log('Finished 3: (error=%s)', JSON.stringify(err, null, 2));
      }
    );
</code>

![winston](https://cldup.com/ZcEghxatuM-3000x3000.png "Looks like this...")

---
_Source: https://npm.io/package/winston-bishop-slack · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
