inlight-media/winston-loggly

Name: winston-loggly

Owner: Inlight

Description: A Loggly transport for winston

Created: 2016-09-13 03:25:36.0

Updated: 2016-09-13 03:25:37.0

Pushed: 2016-09-13 03:32:12.0

Homepage: http://github.com/indexzero/winston-loggly

Size: 41

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

winston-loggly

A Loggly transport for winston.

Usage
r winston = require('winston');


 Requiring `winston-loggly` will expose
 `winston.transports.Loggly`

quire('winston-loggly');

nston.add(winston.transports.Loggly, options);

The Loggly transport is based on Nodejitsu's node-loggly implementation of the Loggly API. If you haven't heard of Loggly before, you should probably read their value proposition. The Loggly transport takes the following options. Either 'inputToken' or 'inputName' is required:

Metadata: Logged in suggested Loggly format

Motivation

tldr;?: To break the winston codebase into small modules that work together.

The winston codebase has been growing significantly with contributions and other logging transports. This is awesome. However, taking a ton of additional dependencies just to do something simple like logging to the Console and a File is overkill.

Installation
Installing npm (node package manager)
curl http://npmjs.org/install.sh | sh
Installing winston-loggly
npm install winston
npm install winston-loggly
Run Tests

All of the winston tests are written in vows, and cover all of the use cases described above. You will need to add valid credentials for the various transports included to test/config.json before running tests:


"transports": {
  "loggly": {
    "subdomain": "your-subdomain",
    "inputToken": "really-long-token-you-got-from-loggly",
    "auth": {
      "username": "your-username",
      "password": "your-password"
    }
  }
}

Once you have valid configuration and credentials you can run tests with npm:

m test
Author: Charlie Robbins License: MIT

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.