Skip to content
A Bunyan stream to send events to Seq
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
example
test
.gitignore
LICENSE
README.md
appveyor.yml
index.js
package-lock.json
package.json
seq_stream.js

README.md

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.

You can’t perform that action at this time.