🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@gridonic/log

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gridonic/log

Consistent console logging.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
3
Created
Source


Consistent console logging for our CLI apps.


Installation

Very simple. Just run $ npm install @gridonic/log.


How to use?

Examples say more than a thousand words.

const { info, error, success, warning } = require('@gridonic/log');

try {
    info('Starting my app…');
    
    if (specialCondition() === true) {
        warning('Please pay attention to this.');
    }
    
    // Make sure success message has enough blank space before it
    success('Everything done.', 0, 3);
} catch(myBadError) {
    error(myBadError);
}

You may also use the second (newlineAfter) and third (newlineBefore) parameter for adding newlines.

gridonic.chgridonic.github.io@gridonic

Keywords

console

FAQs

Package last updated on 18 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts