A simple logger for node cli, it wraps around chalk and ora package.
npm install log-cli
or
yarn add log-cli
const Logger = require('log-cli')
const logger = new Logger();
logger.log('this is normal message');
// prints the success message in green color
logger.success('this is success message');
// prints the message with the default prefix
logger.success('this is success message', true);
warn, success, error, log, info, bold, spin, spinStart, spinStop
Default color mapping
{
"error": "red",
"info": "cyan",
"warn": "yellow",
"success": "green"
}
You can override colors using the setColor
method like below
logger.setColor({info: 'grey'});