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

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 2.1.3 to 3.0.0

41

example.js

@@ -1,40 +0,3 @@

/**
*
* Run `node example.js` to see the output of these examples
*
*/
var logger = require("./index").Logger({
prefix: "{blue:[}{cyan:BS}{blue:] }"
}).setLevelPrefixes(true).setLevel("debug");
var l = require('./out');
/**
* Standard loggers
*/
logger.debug("Debugging Msg");
logger.info("Info statement");
logger.warn("A little warning");
logger.error("an error occurred!");
/**
*
*/
logger.setLevelPrefixes(false);
/**
*
*/
logger.log("error", "Use {green:%s} %s", "String substitution", "is cool");
/**
* Without level prefixes
*/
logger.log("info", "No LEVEL prefix here");
/**
* Un-prefixed
*/
logger.unprefixed("info", "NO PREFIX");
var clone = logger.clone(function (config) {
return config;
});
console.log(l);

15

index.js

@@ -7,12 +7,7 @@ /**

/**
* Lodash.clonedeep for deep cloning
* Lodash clonedeep & merge
*/
var cloneDeep = require("lodash.clonedeep");
var _ = require("./lodash.custom");
/**
* opt-merger for option merging
*/
var merge = require("opt-merger");
/**
* Default configuration.

@@ -75,3 +70,3 @@ * Can be overridden in first constructor arg

this._mute = false;
this.config = merge.set({simple: true}).merge(defaults, config);
this.config = _.merge({}, defaults, config);
this.addLevelMethods(this.config.levels);

@@ -264,3 +259,3 @@ this.compiler = new tfunk.Compiler(this.config.custom || {}, this.config);

var config = cloneDeep(this.config);
var config = _.cloneDeep(this.config);

@@ -270,3 +265,3 @@ if (typeof opts === "function") {

} else {
config = merge.set({simple: true}).merge(config, opts || {});
config = _.merge({}, config, opts || {});
}

@@ -273,0 +268,0 @@

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

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

"test": "npm run lint && mocha",
"lodash": "lodash include=cloneDeep,merge exports=node",
"cover": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
},
"dependencies": {
"lodash.clonedeep": "4.3.1",
"opt-merger": "^1.1.0",

@@ -46,2 +46,3 @@ "tfunk": "^3.0.1"

"jshint": "^2.6.0",
"lodash-cli": "4.12.0",
"mocha": "^2.1.0",

@@ -48,0 +49,0 @@ "sinon": "^1.12.2"

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