gulog
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

gulog

A simple console logger.

Installation

$ npm install gulog

Usage

const log = require('gulog');

// All possible options
log.setup({
    usePrefix: true,
    prefix: '[gulog]',
    prefixColor: 'magenta',
    info: {
        usePrefix: true,
        prefix: '[info]',
        prefixColor: 'cyan',
        messageColor: 'white',
    },
    error: {
        usePrefix: true,
        prefix: '[error]',
        prefixColor: 'redBright',
        messageColor: 'red',
    },
    warning: {
        usePrefix: true,
        prefix: '[warn]',
        prefixColor: 'yellowBright',
        messageColor: 'yellow',
    },
    success: {
        usePrefix: true,
        prefix: '[success]',
        prefixColor: 'green',
        messageColor: 'white',
    },
});

log.info('This is an information :)');
log.success('success, yeah!!!');
log.warning('Whoops... A warning.');
log.error('Oh no! An error 😨 😨');

Result

Package Sidebar

Install

npm i gulog

Weekly Downloads

2

Version

2.0.0

License

MIT

Unpacked Size

9.73 kB

Total Files

7

Last publish

Collaborators

  • gustavorocha