Package Exports
- dever
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 (dever) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
dever
A dev helper.
Installation
npm install deverQuick Start
var debug = require('dever').debug('api/users')
var error = require('dever').error('api/users')
debug('hey, I got something here')
return error('opps, something goes wrong')Silent Mode
Turn off the output:
var debug = require('dever').debug('/api/users', 'shutup')
var error = require('dever').error('/api/users', 'swallow')Log levels
0 [EMERGENCY] system is unusable 1 [ALERT] action must be taken immediately 2 [CRITICAL] the system is in critical condition 3 [ERROR] error condition 4 [WARNING] warning condition 5 [NOTICE] a normal but significant condition 6 [INFO] a purely informational message 7 [DEBUG] messages to debug an application
dev.json
A config file to control output in development:
{
"output": {
"EMERGENCY": true,
"ALERT": true,
"CRITICAL": true,
"ERROR": true,
"WARNING": true,
"NOTICE": true,
"INFO": true,
"DEBUG": true
},
"throw": true
}pro.json
A config file to control output in production:
{
"output": {
"EMERGENCY": false,
"ALERT": false,
"CRITICAL": false,
"ERROR": false,
"WARNING": false,
"NOTICE": false,
"INFO": false,
"DEBUG": false
},
"throw": false
}Copyright (c) 2013 Shallker Wang - MIT License (enclosed)