1.0.2 • Published 8 years ago

winston-slack-light v1.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

winston-slack

A Slack transport for winston

Installation

npm install winston
npm install winston-slack-light

Usage

var winston = require('winston');
require('winston-slack').Slack;
var transport = new winston.transports.Slack({
    token: '<api token>',
    chatId: '<channel or user slack id>'
});
var logger = new winston.Logger({ transports: [transport] });

Options:

  • chatId: Channel or user ID
  • token: Your private API Slack token
  • asUser: Send message as user. By default, message send as bot user. Info
  • asAttachment: Send message with body as attachment. It gives you ability to use colors for any log level.
  • attachmentTitle: Set text for message. This text will be show in push notification. By default, log level.
  • colors: Set your own colors for log levels. Properties: debug, verbose, info, warn, error.
1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago