1.0.0 • Published 5 years ago

@gridonic/log v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

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.