Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@voliware/logger

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@voliware/logger - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

2

package.json
{
"name": "@voliware/logger",
"version": "2.0.3",
"version": "2.0.4",
"description": "A tiny Javascript logger with levels and several options. Supports Node, MongoDB, and all modern Browsers",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -35,3 +35,3 @@ const Logger = require('./logger');

this.collection = collection;
this.log_count = this.collection.countDocuments();
this.log_count = 0;
this.console_logger = new Logger(name, {level, enabled: console, context, maxlogs, timestamp});

@@ -48,2 +48,13 @@ }

/**
* Insert a message into the collection
* @param {LoggerMessage} message
*/
insertMessage(message){
if(!this.log_count){
this.log_count = this.collection.countDocuments();
}
this.collection.insertOne(message);
}
/**
* The output function to log a verbose message.

@@ -55,3 +66,3 @@ * @param {LoggerMessage|Object} message

this.console_logger.enabled && this.console_logger._verbose(message);
return this.collection.insertOne(message);
return this.insertMessage(message);
}

@@ -66,3 +77,3 @@

this.console_logger.enabled && this.console_logger._debug(message);
return this.collection.insertOne(message);
return this.insertMessage(message);
}

@@ -77,3 +88,3 @@

this.console_logger.enabled && this.console_logger._info(message);
return this.collection.insertOne(message);
return this.insertMessage(message);
}

@@ -88,3 +99,3 @@

this.console_logger.enabled && this.console_logger._warning(message);
return this.collection.insertOne(message);
return this.insertMessage(message);
}

@@ -99,9 +110,16 @@

this.console_logger.enabled && this.console_logger._error(message);
return this.collection.insertOne(message);
return this.insertMessage(message);
}
/**
* Create a new collection
*/
createNewCollection(){
// return this.db.createCollection(name)
}
/**
* Delete the first document
* @returns {Promise}
*/
deleteFirstDocument(){

@@ -108,0 +126,0 @@ return this.collection.deleteOne({});

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc