Needlessly Postulating Minds

    log-cli

    1.0.0 • Public • Published

    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:

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

    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.

    Install

    npm i log-cli

    DownloadsWeekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    400 kB

    Total Files

    9

    Last publish

    Collaborators

    • pajay