2.2.1 • Published 8 months ago

@lilywonhalf/pretty-logger v2.2.1

Weekly downloads
1
License
ISC
Repository
github
Last release
8 months ago

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 :) !

2.2.1

8 months ago

2.2.0

8 months ago

2.1.0

9 months ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago