A good log module for browser.More convenient and elegant.
- 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
Recommended way is by npm
npm install --save easy.log.js
Also support using by script
<script src="dist/easy.log.js"></script>
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");
// ...
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.
MIT