Skip to content

Repository files navigation

log-cli

Build Status

A simple logger for node cli, it wraps around chalk and ora package.

Installation

npm install log-cli

or

yarn add log-cli

Usage:

constLogger=require('log-cli')constlogger=newLogger();logger.log('this is normal message');// prints the success message in green colorlogger.success('this is success message');// prints the message with the default prefixlogger.success('this is success message',true);

Examples

Methods

warn, success, error, log, info, bold, spin, spinStart, spinStop

Change the default colors of logging

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'});

credits.

About

✨ Logger module for node cli's.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages