1.0.0 • Published 9 years ago

standard-levels v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

standard-levels

NPM Version

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?