eazy-logger
Advanced tools
Comparing version 2.1.3 to 3.0.0
@@ -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" |
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
2
19009
7
217
- Removedlodash.clonedeep@4.3.1
- Removedlodash._baseclone@4.5.7(transitive)
- Removedlodash.clonedeep@4.3.1(transitive)