@voliware/logger
Advanced tools
Comparing version 2.0.7 to 2.0.8
{ | ||
"name": "@voliware/logger", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"description": "A tiny Javascript logger with levels and several options. Supports Node, MongoDB, and all modern Browsers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -59,6 +59,11 @@ const Logger = require('./logger'); | ||
insertMessage(message){ | ||
if(!this.collection){ | ||
return; | ||
} | ||
if(!this.log_count){ | ||
this.log_count = this.collection.countDocuments(); | ||
} | ||
// If an _id was passed, assume it's for logging purposes | ||
// If an _id was passed, we should clone | ||
if(message._id){ | ||
@@ -68,2 +73,3 @@ message._id_ = message._id; | ||
} | ||
this.collection.insertOne(message); | ||
@@ -70,0 +76,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42773
987