Skip to content

Use addLevel() to define your own custom levels.

Latest
Compare
Choose a tag to compare
@SirR4T SirR4T released this 28 May 19:03
· 48 commits to master since this release

You can add your own custom levels now.

The level name and priority are mandatory arguments, and
lgr will throw an error if either is missing. You can
define your own style and prefix, npm style.

// mandatory arguments
log.addLevel('wall', 3500);

// optional arguments
log.addLevel('hell', 6666, {fg: 'black', bg: 'red'}, 'HELL!');