eazy-logger
Advanced tools
Comparing version 1.3.3 to 1.4.0
@@ -1,40 +0,17 @@ | ||
/** | ||
* | ||
* 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 EasyLogger = require("./index").Logger; | ||
/** | ||
* Standard loggers | ||
*/ | ||
logger.debug("Debugging Msg"); | ||
logger.info("Info statement"); | ||
logger.warn("A little warning"); | ||
logger.error("an error occurred!"); | ||
var logger = new EasyLogger({ | ||
prefix: function () { | ||
var date = new Date(); | ||
return this.compile("{magenta:["+date+"] "); | ||
} | ||
}); | ||
/** | ||
* | ||
*/ | ||
logger.setLevelPrefixes(false); | ||
logger.setLevelPrefixes(true).log("info", "Hello"); | ||
/** | ||
* | ||
*/ | ||
logger.log("error", "Use {green:%s} %s", "String substitution", "is cool"); | ||
logger.info("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; | ||
}); | ||
@@ -187,2 +187,5 @@ /** | ||
} | ||
if (_.isFunction(prefix)) { | ||
this.compiler.prefix = prefix; | ||
} | ||
}; | ||
@@ -189,0 +192,0 @@ |
{ | ||
"name": "eazy-logger", | ||
"description": "Simple cli logger", | ||
"version": "1.3.3", | ||
"version": "1.4.0", | ||
"homepage": "https://github.com/shakyshane/easy-logger", | ||
@@ -33,3 +33,3 @@ "author": { | ||
"opt-merger": "^0.2.1", | ||
"tfunk": "^2.0.2" | ||
"tfunk": "^2.1.0" | ||
}, | ||
@@ -36,0 +36,0 @@ "devDependencies": { |
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
8477
8
237
Updatedtfunk@^2.1.0