UNPKG

webhook-receive

Version:

Pluggable webhook receiver used to trigger selected deployment script

43 lines (33 loc) 855 B
var _ = require("lodash"); var winston = require("winston"); module.exports = { defaults: { Console: { colorize: true, timestamp: true, level: "info" } }, initialize: function(options){ this.logger = new(winston.Logger); this.logger.exitOnError = false; _.defaults(options.configuration, this.defaults[options.type]); this.logger.add(winston.transports[options.type], options.configuration); this.logger.handleExceptions(); }, error: function(log){ this.logger.error(log); }, warn: function(log){ this.logger.warn(log); }, info: function(log){ this.logger.info(log); }, verbose: function(log){ this.logger.verbose(log); }, debug: function(log){ this.logger.debug(log); } }