simple-console-logger2
v1.1.2
Published
A logger which colorizes output, auto-inspects objects, and correctly writes to stdout or stderror. Can be marked as sync (blockingly writes to stdout/err) or async (uses console.log, not synchronous).
Downloads
4
Readme
simple console logger for browser and nodejs;
A logger which colorizes output, auto-inspects objects, and correctly writes to stdout or stderror. Can be marked as sync (blockingly writes to stdout/err) or async (uses console.log, not synchronous).
Features:
- support "DEBUG" "INFO" "TRACE" "WARNING" "OFF";
- support trace into logger code's line;
- support logger's label;
Install:
npm install simple-console-logger2
Usage:
ConsoleLogger.getLogger("label for logger");
logger.setLevel("INFO",{traceLogger:true})
logger.info("hello world")
//console out=> [INFO-label for logger] hello world