UNPKG

monolog

Version:

Log with Monolog

42 lines (32 loc) 1.24 kB
// Generated by CoffeeScript 1.6.3 var AbstractHandler, NullHandler, _ref, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; AbstractHandler = require('./AbstractHandler'); NullHandler = (function(_super) { __extends(NullHandler, _super); function NullHandler() { _ref = NullHandler.__super__.constructor.apply(this, arguments); return _ref; } /* Any record it can handle will be thrown away. This can be used to put on top of an existing stack to override it temporarily. @param {Object} record @param {Function} cb @return {Boolean} */ NullHandler.prototype.handle = function(record, cb) { if (record.level < this.level) { cb(new Error('cant handle record'), void 0, record, this); return false; } else { NullHandler.__super__.handle.apply(this, arguments); return true; } }; return NullHandler; })(AbstractHandler); /* //@ sourceMappingURL=NullHandler.map */