nsyslog
Version:
Modular new generation log agent. Reads, transform, aggregate, correlate and send logs from sources to destinations
23 lines (18 loc) • 412 B
JavaScript
const
Transporter = require('../../lib/nsyslog').Core.Transporter;
class MyTransporter extends Transporter {
constructor(id) {
super(id);
this.count = 0;
}
configure(config,callback) {
callback();
}
transport(entry, callback) {
this.count++;
if((this.count%100)==0)
console.log(`Output => ${this.count}`);
callback(null,entry);
}
}
module.exports = MyTransporter;