Skip to content

A light weight and faster Bunyan transport stream for logentries

License

Notifications You must be signed in to change notification settings

ashisherc/bunyan-transport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bunyan-transport

A light weight and faster Bunyan transport stream for logentries written from scratch inspired by le_node (does not depend on le_node).

install

npm install bunyan-transport --save

use

const bunyan = require('bunyan');
const bunyanTransport = require('bunyan-transport');

const logentriesStream = new bunyanTransport.LogentriesStream({
  token: 'token',
  exclude : ["pid"]  // to prevent pid from logged in logentries
});

const logger = bunyan.createLogger({
  name: "Service x",
  streams: [{
    stream: logentriesStream,
    type:'raw', // required
    level: 'trace'
  }]
});

logger.error("error got logged in logentries");

Options

token : 'token string' // required
exclude: [key] ex. pid, hostname, v
debugLogEnabled : true | false // prints transport strean logs, default - false 
port : optional
host : optional

To do

  • More website support

Contribute

Currently bunyan-transport supports only logentries stream, other log website support to be added. Feel free to contribute.

About

A light weight and faster Bunyan transport stream for logentries

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published