ins-logger
v1.0.4
Published
easy log trace in module in app
Downloads
2
Readme
idea
A logger can solve follow problem
- identify different modules
- trace async log step
- do not clean log info in production
install
npm install ins-logger -D
usage
in node
//yourModule.js
const insLogger =require('ins-logger')
in import module
import insLogger from 'ins-logger'
const log=insLogger({
moduleName:'yourModule',
isDebug:process.env.NODE_ENV!=='production' //default setting
})
//const log=insLogger({moduleName:'yourModule'})
log(1)
log("test",2)
log({foo:"bar"})