@lilywonhalf/pretty-logger
TypeScript icon, indicating that this package has built-in type declarations

2.2.1 • Public • Published

Pretty Logger

A simple tool to create nice and colorful logs.

Installation

For pretty much everyone

npm install --save @lilywonhalf/pretty-logger

For nerds :]

npm i -S @lilywonhalf/pretty-logger

Usage

It's pretty straightforward.

var Logger = require("@lilywonhalf/pretty-logger");

Logger.info('This is an info log!');
Logger.error('This is an error log!');
Logger.warning('This is a warning log!');
Logger.notice('This is a notice log!');

const exception = new Error('This is an exception');

Logger.exception(exception);

// Thanks to Colen from StackOverflow for this one!
// https://stackoverflow.com/questions/2710967/how-do-i-store-complex-objects-in-javascript
const complexObject = [
    {"name": "Jim's Ford Focus", "color": "white", isDamaged: true, wheels: 4},
    {"name": "Bob's Suzuki Swift", "color": "green", isDamaged: false, wheels: 4},
    {"name": "Alex's Harley Davidson", "color": "black", isDamaged: false, wheels: 2}
];

Logger.debug(complexObject);

Contribution

Make pull requests or open issues :) !

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i @lilywonhalf/pretty-logger

    Weekly Downloads

    1

    Version

    2.2.1

    License

    ISC

    Unpacked Size

    18.6 kB

    Total Files

    15

    Last publish

    Collaborators

    • lilywonhalf