Skip to content

Commit

Permalink
Added basic winston logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarvesh Chitko committed Feb 22, 2019
1 parent 9624b6b commit 7b3089f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* @module LogstashTransport
*/
const winston = require("winston")
const Transport = winston.transport;
/**
* @class LogstashTransport
* @extends Transport
*/
module.exports =
class LogstashTransport extends Transport {
/**
*
* @param {*} options
*/
constructor(options){
super(options);
this.name='LogstashTransport'
this.input=options.input

}
log(info,callback) {
setImmediate(()=>{
this.emit('logged',info);
})
callback()
}
}

0 comments on commit 7b3089f

Please sign in to comment.