@rabbitcc/logger
v0.2.2
Published
A log tool
Downloads
4
Readme
Yet anthor logger tool
Works on Nodejs and Browsers
Install
npm i -D @rabbitcc/logger
Usage
import log from '@rabbitcc/logger'
log.info('name', 'action', 'contents')
Setup logger level
// via cross-env scripts
cross-env LOGGER_LEVEL=DEBUG
Or if you want works on browser, can pass the evn via webpack.EnvironmentPlugin
plugins: [
//...other plugins
new EnvironmentPlugin([ 'LOGGER_LEVEL' ]),
// or pass default level if not set
new EnvironmentPlugin({ LOGGER_LEVEL: 'DEBUG' }),
]