Socket
Socket
Sign inDemoInstall

eazy-logger

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eazy-logger - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

4

example.js

@@ -7,3 +7,3 @@ /**

var logger = require("./index").Logger({
prefix: "{blue:[}{magenta:easy-logger}{blue:] }"
prefix: "{blue:[}{cyan:BS}{blue:] }"
}).setLevelPrefixes(true).setLevel("debug");

@@ -27,3 +27,3 @@

*/
logger.log("error", "Use {green:built-in} %s", "String substitution");
logger.log("error", "Use {green:%s} %s", "String substitution", "is cool");

@@ -30,0 +30,0 @@ /**

@@ -76,2 +76,20 @@ /**

/**
* Set an option once
* @param path
* @param value
*/
Logger.prototype.setOnce = function (path, value) {
if (typeof this.config[path] !== "undefined") {
this._memo = {
key: path,
value: this.config[path]
};
this.config[path] = value;
}
return this;
};
/**
* Add convenience method such as

@@ -92,2 +110,3 @@ * logger.warn("msg")

this.log.apply(this, args);
return this;
}.bind(this, item);

@@ -199,2 +218,4 @@ }

this.resetTemps();
return this;

@@ -204,2 +225,13 @@ };

/**
* @param args
* @param msg
* @param level
* @param unprefixed
*/
Logger.prototype.resetTemps = function () {
if (typeof this._memo !== "undefined") {
this.config[this._memo.key] = this._memo.value;
}
};
/**
* Get a clone of the logger

@@ -206,0 +238,0 @@ * @param opts

{
"name": "eazy-logger",
"description": "Simple cli logger",
"version": "1.2.1",
"version": "1.3.0",
"homepage": "https://github.com/shakyshane/easy-logger",

@@ -6,0 +6,0 @@ "author": {

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