JSPM

debug-levels

0.2.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 28
  • Score
    100M100P100Q64283F
  • License ISC

Debug/verbosity level support for Visionmedia's debug module

Package Exports

  • debug-levels
  • debug-levels/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (debug-levels) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

debug-levels

Debug/verbosity level support for Visionmedia's debug module. See https://github.com/visionmedia/debug for debug module usage information.

Installation:

npm install debug-levels

List of available levels:

var levels = require('debug-levels').levels;

//  [ 'log', 'error', 'warn', 'debug', 'info', 'verbose' ]
  • log
  • error
  • warn
  • debug
  • info
  • verbose (default)

Example Usage:

Display "error" and "log" debug level messages

$ DEBUG=* DEBUG_LEVEL=error node index.js
var debug = require('debug-levels')('example');

// Retain original debug module usage
debug('doing some work');

// Display when using levels: log, error, warn, debug, info, and verbose
debug.log('debug.log()');

// Display when using levels: error, warn, debug, info, and verbose
debug.error('debug.error()');

// Display when using levels: warn, debug, info, and verbose
debug.warn('debug.warn()');

// Display when using levels: debug, info, and verbose
debug.debug('debug.debug()');

// Display when using levels: info and verbose
debug.info('debug.info()');

// Display when using levels: verbose
debug.verbose('debug.verbose()');

License

(The ISC License)

Copyright (c) 2014, Eugene Song <tilleps@gmail.com>

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.