@pi2star/logger
v1.1.2
Published
A simple logger.
Downloads
8
Readme
logger
Pi2star logger.
Install
npm i @pi2star/logger
Demo
const logger = require('@pi2star/logger')
logger()
console.log('test')
console.info('test')
console.warn('test')
console.error('test')
[INFO] test
[INFO] test
[WARN] test
[ERROR] test
With Timestamp
const logger = require('@pi2star/logger')
logger({timestamp:true})
console.log('test')
console.info('test')
console.warn('test')
console.error('test')
2019-11-13T04:17:25.221Z [INFO] test
2019-11-13T04:17:25.221Z [INFO] test
2019-11-13T04:17:25.221Z [WARN] test
2019-11-13T04:17:25.221Z [ERROR] test