/good-loggly

Loggly broadcasting for Good process monitor

Primary LanguageJavaScriptMIT LicenseMIT

good-loggly

Current Version Build Status via Travis CI Dependencies

belly-button-style

Loggly writable stream.

good-loggly is a writable stream that is used to send events to Loggly. Below is an example of how to use it with the good logger for hapi.

Credit: This module was originally written and maintained by fhemberger.

Compatibility

  • good@7.x.x is compatible with version >=3.x.x.
  • good@6.x.x is compatible with version 1.x.x and 2.x.x.
  • For older versions of good, use v0.1.4.

Usage

Example integration:

var Hapi = require('hapi');
var Good = require('good');

var server = new Hapi.Server();
var options = {
    reporters: {
        loggly: [{
            module: 'good-squeeze',
            name: 'Squeeze',
            args: [{log: '*', request: '*', error: '*', response: '*'}]
        }, {
            module: 'good-loggly',
            args: [{
                token: 'YOUR LOGGLY TOKEN',
                subdomain: 'YOUR LOGGLY SUBDOMAIN',
                name: 'myapp',
                hostname: 'myapp.example.com',
                tags: ['global', 'tags', 'for', 'all', 'requests']
            }]
        }]
    }
};

server.register({
    register: Good,
    options: options
}, function (err) {
    if (err) {
        return console.error(err);
    }
});