
Security News
Node.js TSC Votes to Stop Distributing Corepack
Corepack will be phased out from future Node.js releases following a TSC vote.
debug-logtron
Advanced tools
A debug logger with a logtron interface.
This logger does nothing unless you start the process with
NODE_DEBUG=mylibrary
.
var DebugLogtron = require("debug-logtron");
var logger = DebugLogtron('mylibrary');
logger.debug('some fixed string', { some: 'meta object' });
logger.info('some fixed string', { some: 'meta object' });
logger.warn('some fixed string', { some: 'meta object' });
logger.error('some fixed string', { some: 'meta object' });
Warning: This a logger for testing! Not a default logger.
If you want to add a default logger to your dependencies
then I strongly recommend you use null-logtron
You want to instrument your application and your libraries with a production application logger. A logger that writes somewhere in production.
However for your writing tests for both your libraries and your applications you probably do not want to see all of your logs spewing on STDOUT by default.
This is where debug-logtron
comes in, You can start your app
or libraries with the debug logger in your tests which allows
the test runner to decide when to spew.
This works great together with itape --trace
where you can
use itape
to turn on and off trace mode.
// TODO. State what the module does.
npm install debug-logtron
npm test
FAQs
A debug logger with a logtron interface.
The npm package debug-logtron receives a total of 94 weekly downloads. As such, debug-logtron popularity was classified as not popular.
We found that debug-logtron 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
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.
Security News
Oxlint's beta release introduces 500+ built-in linting rules while delivering twice the speed of previous versions, with future support planned for custom plugins and improved IDE integration.