updated dependencies (mongodb -> 1.3.x) and added 'nativeParser' option.
This commit is contained in:
Родитель
2cc697e1f9
Коммит
52354051b8
|
@ -20,7 +20,7 @@ var MongoDB = exports.MongoDB = function (options) {
|
|||
options = options || {};
|
||||
|
||||
if (!options.db) {
|
||||
throw new Error("Cannot log to MongoDB without database name.");
|
||||
throw new Error('Cannot log to MongoDB without database name.');
|
||||
}
|
||||
|
||||
var self = this;
|
||||
|
@ -38,6 +38,7 @@ var MongoDB = exports.MongoDB = function (options) {
|
|||
this.errorTimeout = options.errorTimeout || 10000;
|
||||
this.capped = options.capped;
|
||||
this.cappedSize = options.cappedSize || 10000000;
|
||||
this.nativeParser = options.nativeParser || false;
|
||||
// TODO: possibly go by docs (`max`) instead
|
||||
// this.length = options.length || 200;
|
||||
|
||||
|
@ -54,7 +55,8 @@ var MongoDB = exports.MongoDB = function (options) {
|
|||
|
||||
this.server = new mongodb.Server(this.host, this.port, {});
|
||||
this.client = new mongodb.Db(this.db, this.server, {
|
||||
native_parser: false
|
||||
native_parser: this.nativeParser,
|
||||
safe: this.safe
|
||||
});
|
||||
|
||||
this.server.on('error', function (err) {
|
||||
|
|
13
package.json
13
package.json
|
@ -1,22 +1,23 @@
|
|||
{
|
||||
"name": "winston-mongodb",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"description": "A MongoDB transport for winston",
|
||||
"author": "Charlie Robbins <charlie.robbins@gmail.com>",
|
||||
"contributors": [
|
||||
{ "name": "Kendrick Taylor", "email": "sktayloriii@gmail.com", "email": "yosefd@microsoft.com" }
|
||||
{ "name": "Kendrick Taylor", "email": [ "sktayloriii@gmail.com", "yosefd@microsoft.com" ] },
|
||||
{ "name": "Yurij Mikhalevich", "email": "0@39.yt" }
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "http://github.com/indexzero/winston-mongodb.git"
|
||||
},
|
||||
"keywords": ["logging", "sysadmin", "tools", "winston", "mongodb"],
|
||||
"keywords": [ "logging", "sysadmin", "tools", "winston", "mongodb", "log" ],
|
||||
"dependencies": {
|
||||
"mongodb": "0.9.x"
|
||||
"mongodb": "1.3.x"
|
||||
},
|
||||
"devDependencies": {
|
||||
"winston": "0.5.x",
|
||||
"vows": "0.6.x"
|
||||
"winston": "0.7.x",
|
||||
"vows": "0.7.x"
|
||||
},
|
||||
"main": "./lib/winston-mongodb",
|
||||
"scripts": { "test": "vows test/*-test.js --spec" },
|
||||
|
|
Загрузка…
Ссылка в новой задаче