Node Logger
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.editorconfig
.eslintrc
.gitignore
LICENSE
README.md
index.js
package.json

README.md

logger

Node Logger

Install

$ npm i @acyort/logger -S

Usage

const logger = require('@acyort/logger')('test')  // default name: acyort

logger.log('log')
logger.success('success')
logger.warn('warn')
logger.info('info')
logger.error('error')

/*
log
SUCCESS success
WARN warn
INFO info
ERROR error
*/

/* disable logger */
global.DISABLE_LOGGER = 'acyort' // disable `acyort` logger
global.DISABLE_LOGGER = 'test:error' // disable `test` error logger
global.DISABLE_LOGGER = 'test:error,info' // disable `test` error, info logger

/* set env disable logger */
// DISABLE_LOGGER='test:log' node index.js