ins-logger

1.0.4 • Public • Published

idea

A logger can solve follow problem

  1. identify different modules
  2. trace async log step
  3. 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"})

Readme

Keywords

Package Sidebar

Install

npm i ins-logger

Weekly Downloads

0

Version

1.0.4

License

ISC

Unpacked Size

1.36 kB

Total Files

4

Last publish

Collaborators

  • insonghua2