winston-slack-light
v1.0.2
Published
A Slack transport for winston
Downloads
2
Readme
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.