Giter Site home page Giter Site logo

acrespillo / winston-sns Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jesseditson/winston-sns

0.0 1.0 0.0 17 KB

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

CoffeeScript 99.43% JavaScript 0.57%

winston-sns's Introduction

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'),
      winstonSNS = require('winston-sns');

  winston.add(winstonSNS, 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 Amazon's AWS SDK for JavaScript to generate Amazon SNS messages, so if you have a ~/.aws/credentials file, a AWS.config file, or are running on a EC2 instance that has a IAM role associated with it, you don't need to specify your AWS credentials. To read more about this, please see the Amazon Documentation on Configuring the SDK in Node.js

Options

  • 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]
  • aws_key: Your Amazon Web Services Key.
  • aws_secret: Your Amazon Web Services Secret.
  • 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. Uses placeholders for level (%l), error message (%e), and metadata (%m). (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)
  • json: use json instead of a prettier (human friendly) string for meta information in the notification. (default: false)
  • handleExceptions: set to true to have this transport handle exceptions. (default: false)
  • silent: Boolean flag indicating whether to suppress output (default: false)

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

winston-sns's People

Contributors

jesseditson avatar mattcbowman avatar seriousben avatar

Watchers

Crespillo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.