Skip to content

joshwilsdon/effluent-logger

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

effluent-logger

effluent-logger is a stream-based logger based on: fluent-logger-stream redesigned to only log using the 'forward' type and to allow a filtered stream of log messages.

Usage

Create bunyan log stream

You can create a bunyan logger log with an EffluentLogger stream attached to send all messages that have an evt property to a remote fluentd server:

var bunyan = require('bunyan');
var EffluentLogger = require('effluent-logger');

var evtLogger = new EffluentLogger({
    filter: function _evtFilter(obj) { return (!!obj.evt); },
    host: '127.0.0.1',
    port: 24224,
    tag: 'debug'
});

var log = bunyan.createLogger({
    name: 'myapp-eventlog',
    streams: [{
        stream: evtLogger,
        type: 'raw'
    }],
    level: 'debug'
});

License

The MIT License

About

Stream-based Fluentd logger for Node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%