‚̧Norvell's Public Machinations
    Wondering what‚Äôs next for npm?Check out our public roadmap! ¬Ľ

    @digitalronin/logger

    1.0.3¬†‚Äʬ†Public¬†‚Äʬ†Published

    @digitalronin/logger

    NPM npm (scoped) Build Status

    A simple wrapper for console.log for Node or browser. The former supports colors, using chalk Link

    Installation

    # Using Yarn 
    > yarn add @digitalronin/logger --dev
     
    # Using NPM 
    > npm install @digitalronin/logger -D

    Usage

    Browser

    const Logger = require('@digitalronin/logger');
    const l = new Logger();
     
    // console.log
    l.log('Test log');
     
    // console.error
    l.error('Test error');
     
    // console.log
    l.info('Test info');

    Node

    const Logger = require('@digitalronin/logger');
    const l = new Logger();
     
    // console.log in white
    l.log('Test log');
     
    // console.log in red
    l.error('Test error');
     
    // console.log in blue
    l.info('Test info');

    Overwriting default colors

    Only the following colors is supported

    const Logger = require('@digitalronin/logger');
    const l = new Logger({
      error: 'blue',
      info: 'white',
      log: 'green',
    });

    Install

    npm i @digitalronin/logger

    DownloadsWeekly Downloads

    0

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    10.9 kB

    Total Files

    12

    Last publish

    Collaborators

    • avatar