
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
node-diagnostics
Advanced tools
This module wrap the node.js util.log funciton with some basic level filtering and prefix the message with the process.pid and module name provided.
It also has a Timer functionnality to profile/measure the elapsed time in certain part of your code.
#LICENSE:
This module is licensed under the Apache License v2.0
npm install node-diagnostics
// All diagnostics logs will be prefixed with 'MyModuleName'
var diag = require('node-diagnostics')('MyModuleName');
// Start a timer to display the elapsed time of this section of code.
var timer = diag.startTimer();
// Set the diagnostic level to INFO. Make sure that you reassign the diag
// object with the result of setLevel if you want to be able to use the
// 'diag.level' in you if condition, otherwise it will have the default
// value of 'error'!
diag = diag.setLevel(diag.info);
diag.log(diag.finest, 'FINEST|Will not be shown, but the string concatenation'
+ ' will still be done and the method called, it is'
+ ' slower than the next invocation.');
if (diag.level >= diag.finest) diag.log(diag.finest, 'FINEST|Will not be shown'
+ ' but no method invocation and no string concatenation.'
+ ' this is the prefered way');
if (diag.level >= diag.info) diag.log(diag.info, 'INFO|Will be shown!');
diag.log(diag.info, 'INFO|Will be shown!');
diag.log(diag.info, 'test ran in ' + timer.stop().format());
FAQs
Logging and Timer to perform some basic profiling and diagnostics
The npm package node-diagnostics receives a total of 0 weekly downloads. As such, node-diagnostics popularity was classified as not popular.
We found that node-diagnostics 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.