nsyslog
Version:
Modular new generation log agent. Reads, transform, aggregate, correlate and send logs from sources to destinations
25 lines (20 loc) • 478 B
JavaScript
const
Transporter = require('../../lib/nsyslog').Core.Transporter,
jsexpr = require('jsexpr');
class MyTransporter extends Transporter {
constructor(id) {
super(id);
}
configure(config,callback) {
config = config || {};
this.format = jsexpr.expression(config.format);
this.block = config.block || false;
callback();
}
transport(entry, callback) {
if(!this.block) {
callback(null,entry);
}
}
}
module.exports = MyTransporter;