Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
simple-debug
Advanced tools
Simple tool to limit log output. It's configuration is compatible with visionmedia/debug.
var debug = require('simple-debug')('mything');
setInterval(function(){
debug('doing something useful');
}, 1000);
The DEBUG
environment variable used to enable logging. Give it space- or comma-separated names.
$ DEBUG=mything node myapp
doing something useful
doing something useful
doing something useful
var debug = require('simple-debug');
debug.working = debug('working');
debug.waiting = debug('waiting');
setInterval(function(){
debug.working('doing something useful');
// ...
debug.waiting('pausing for 1s');
}, 1000);
Turn on only the waiting
log.
$ DEBUG=waiting node myapp
pausing for 1s
pausing for 1s
Turn on both.
$ DEBUG=waiting,working node myapp
doing something useful
pausing for 1s
doing something useful
pausing for 1s
Send output through console.err
instead of console.log
.
var debug = require('simple-debug')('mything');
debug.log = console.error.bind(console);
setInterval(function(){
debug('doing something useful');
}, 1000);
MIT. The core functions were extracted from debug. See LICENSE for details.
FAQs
simple tool to limit log output
The npm package simple-debug receives a total of 98 weekly downloads. As such, simple-debug popularity was classified as not popular.
We found that simple-debug demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.