mustang-log

1.1.2 • Public • Published

**Mustang Log**

A handy tool if you want to clean up your console logging!

How it works:

const { log } = require('mustang-log');
log('something', 'TYPE', showTime);
//TYPES: INFO, DEBUG, WARN, ERROR, VERBOSE(default, specify no type).
// showTime: Show time at which it was logged. (prefixed)

Examples:

Custom log TYPES!

const { log } = require('mustang-log');
log('this is custom!', {name: 'CUSTOM', bgColor: '#ff0000', textColor: '#ffffff'})

Info: INFO

const { log } = require('mustang-log');
log('This is what info looks like!', 'INFO');

Debug: DEBUG

const { log } = require('mustang-log');
log('This is what debug looks like!', 'DEBUG');

Warn: WARN

const { log } = require('mustang-log');
log('This is what warn looks like!', 'warn');

Error: ERROR

const { log } = require('mustang-log');
log('This is what error looks like!', 'error');

Verbose: VERBOSE

const { log } = require('mustang-log');
log('This is what verbose looks like!');

Logging objects

For the debug tag, we can imagine you want to log objects or similar types. this is possible.

log({
    "objecs":"log nicely too!",
    logging: (arg) => {
        log('something', 'verbose', true)
    } 
}, 'DEBUG');

Translates to: objects You can see linebreaks and newlines are handled just fine.

all

Readme

Keywords

Package Sidebar

Install

npm i mustang-log

Weekly Downloads

0

Version

1.1.2

License

Apache-2.0

Unpacked Size

6.92 kB

Total Files

3

Last publish

Collaborators

  • minideathstriker