1.0.0 • Published 5 years ago
easy.log.js v1.0.0
easy.log.js
A good log module for browser.More convenient and elegant.
Feature
- print every log with a group name, then you can filter logs in
console tab
- every log has
stack
info, easily for debugging - you can turn off logging for all groups or specific group
Install
Recommended way is by npm
npm install --save easy.log.js
Also support using by script
<script src="dist/easy.log.js"></script>
Usage
For webpack project
import LOG from 'easy.log.js'
let log1 = LOG("group-name-1");
log1("log");
log1.log("log");
log1.warn("warn");
log1.error("error");
For normal script insert usage, easy.log.js
export one global variable named LOG
let log1 = LOG("group-name-1");
// ...
Tip
easy.log.js is just for browsers.\ Though easy.log.js can run in nodejs environment, you could not need it. Try log4js, it can write logs to file.
License
MIT
1.0.0
5 years ago