@ngbrown/bunyan-seq

0.3.3-patch.2 • Public • Published

bunyan-seq Build status NPM

A Bunyan stream to send events to Seq. Tested with Node.js versions 4.2.2 and up.

Usage

Use the createStream() method to create a Bunyan stream configuration, passing serverUrl, apiKey and batching parameters.

let bunyan = require('bunyan');
let seq = require('bunyan-seq');

var log = bunyan.createLogger({
    name: 'myapp',
    streams: [
        {
            stream: process.stdout,
            level: 'warn',
        },
        seq.createStream({
            serverUrl: 'http://localhost:5341',
            level: 'info'
        })
    ]
});

log.info('Hi!');
log.warn({lang: 'fr'}, 'Au revoir');

You can specify property names as tokens in the log message to control how the event is rendered in Seq:

// Seq will render this as 'Hi, Alice!'
log.info({user: 'Alice'}, 'Hi, {user}!');

Read the complete documentation.

Readme

Keywords

Package Sidebar

Install

npm i @ngbrown/bunyan-seq

Weekly Downloads

0

Version

0.3.3-patch.2

License

Apache-2.0

Unpacked Size

18.5 kB

Total Files

9

Last publish

Collaborators

  • ngbrown