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.
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'
});
The MIT License