1.1.2 • Published 4 years ago

mustang-log v1.1.2

Weekly downloads
11
License
Apache-2.0
Repository
-
Last release
4 years ago

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)

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

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago