Code coverage report for monolog\lib\handler\MongoDBHandler.js

Statements: 100% (28 / 28)      Branches: 50% (4 / 8)      Functions: 100% (6 / 6)      Lines: 100% (20 / 20)      Ignored: none     

All files » monolog\lib\handler\ » MongoDBHandler.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49    1   1   1   1 1                   1 1 1 1 1   1 1   1     1 1 1 1   1     1       1          
// Generated by CoffeeScript 1.6.3
"use strict";
var Abstractprocessinghandler, MongoDBHandler,
  __hasProp = {}.hasOwnProperty,
  __extends = function(child, parent) { for (var key in parent) { Eif (__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; };
 
Abstractprocessinghandler = require('./AbstractProcessingHandler');
 
MongoDBHandler = (function(_super) {
  __extends(MongoDBHandler, _super);
 
  /*
  		@param  {MongoClient} @mongodb    
  		@param  {String} @collection 
  		@param  {Number} level=100  
  		@param  {Boolean} bubble=true
  */
 
 
  function MongoDBHandler(mongodb, collection, level, bubble) {
    this.mongodb = mongodb;
    this.collection = collection != null ? collection : "log";
    Eif (level == null) {
      level = 100;
    }
    Eif (bubble == null) {
      bubble = true;
    }
    MongoDBHandler.__super__.constructor.call(this, level, bubble);
  }
 
  MongoDBHandler.prototype.write = function(record, cb) {
    var _this = this;
    this.mongodb.collection(this.collection).insert(record, function(err, res) {
      return cb(err, res, record, _this);
    });
    return this.bubble;
  };
 
  return MongoDBHandler;
 
})(Abstractprocessinghandler);
 
module.exports = MongoDBHandler;
 
/*
//@ sourceMappingURL=MongoDBHandler.map
*/