winston-sns

A Simple Notification System Transport for winston (http://www.github.com/flatiron/winston)

npm install winston-sns
4 downloads in the last day
19 downloads in the last week
143 downloads in the last month

An Amazon SNS transport for winston.

Installation

Installing winston-sns via npm

  $ npm install winston
  $ npm install winston-sns

(or add it to your package.json)

Usage

  var winston = require('winston');

  //
  // Requiring `winston-mail` will expose 
  // `winston.transports.SNS`
  //
  require('winston-sns').SNS;

  winston.add(winston.transports.SNS, options);

Documentation

Annotated source can be generated using docco:

    docco lib

note that you need pygments installed to use docco - you can install it on a mac by using:

  easy_install pygments

The SNS transport uses awssum to generate amazon sns messages.

  • aws_key: Your Amazon Web Services Key. [required]
  • aws_secret: Your Amazon Web Services Secret. [required]
  • subscriber: Subscriber number - found in your SNS AWS Console, after clicking on a topic. Same as AWS Account ID. [required]
  • topic_arn: Also found in SNS AWS Console - listed under a topic as Topic ARN. [required]
  • region: AWS Region to use. Can be one of: us-east-1,us-west-1,eu-west-1,ap-southeast-1,ap-northeast-1,us-gov-west-1,sa-east-1. (default: us-east-1)
  • subject: Subject for notifications. (default: "Winston Error Report")
  • message: Message of notifications. Uses placeholders for level (%l), error message (%e), and metadata (%m). (default: "Level '%l' Error:\n%e\n\nMetadata:\n%m")
  • level: lowest level this transport will log. (default: info)
  • handleExceptions: set to true to have this transport handle exceptions. (default: false)

Feel free to file issues in this github tracker, I check it often.

npm loves you