1.0.1 • Published 7 years ago

@openmeny/meny-logger v1.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

Meny Logger

This is a logger, yea, thats it.

Use it like this:

import { log } from '@openmeny/meny-logger';

log.info(msg);

Default level is 5. Every log below that level wont be displayed.

Here is the list of methods, their level and style.

{
    log:        [5, 'text-decoration: underline'],

    info:       [5, 'color: #3d8dbc; font-weight: bold'],
    success:    [5, 'color: #24A246; font-weight: bold'],
    warn:       [6, 'color: #F4993D; font-weight: bold'],
    error:      [8, 'color: #EF5350; font-weight: bold'],
    bold:       [9, 'font-weight: bold'],
    low:        [3, 'color: coral'],
    minor:      [2, 'color: #999'],

    core:       [1, 'color: #999'],

    core_low:   [1, 'color: coral'],
    core_minor: [1, 'color: #999'],
}

Change the level of displayed logs:

log.level(8); // now only error and bold will be logged

And happy logging :)