standard-levels
v1.0.0
Published
Definition of standard log levels
Downloads
4
Readme
standard-levels
Definition of standard log levels.
Levels
- CRITICAL - 50
- ERROR - 40
- WARNING - 30
- INFO - 20
- DEBUG - 10
- TRACE - 5
setLevel
A simple function that can be attached to the prototype of any object you want to be able to set a level on. If given a level name it will be translated into it's numeric value before being set.
function Logger() {}
Logger.prototype.setLevel = require('standard-levels').setLevel
var l = new Logger()
l.setLevel('INFO')
Why don't you get on my level?