
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
log-verbose
Advanced tools
Simple log (use console.log) to check if 'verbose' option have been entered
Simple log (use console.log) to check if 'verbose' option have been entered
const log = require('log-verbose');
const text = 'Hello World!';
log.print('Sample-1', text); // Always Show
log({verbose: true}, 'Sample-2', text); // log only if verbose = true
log({verbose: true}, 'Sample-3', 'Object:', {test: {a: 1, b: true}}); // log object
log({verbose: true, verboseFilters: ['sample.js', /.*class.*/g]}, 'Sample-4', text); // filter by sample.js ou class strings
log({verbose: true, verboseFilters: ['*.js', /.*class.*/g]}, 'Sample-5', text); // filter string string DON'T support masking character
log({verbose: true, verboseFilters: [/.*\.js/g]}, 'Sample-6', text); // sample with regex (search all js files to log)
log({}, 'Sample-7', text); // no log
log({verbose: false}, 'Sample-8', text); // no log
log(null, 'ample-S9', text); // no log
log('Sample-10'); // no log
function c() {
log({verbose: true, ignoreStackLines: 1}, ...arguments);
}
c('Sample-11', 'function to simplify the use.', 'Will indicate this line in the log!');
log({verbose: true}, 'Sample-12', c);
log({verbose: true}, 'Sample-13', new Error('Test error log!'));
Output:
tests/sample.js:5:5 : Sample-1 Hello World!
tests/sample.js:7:1 : Sample-2 Hello World!
tests/sample.js:9:1 : Sample-3 Object: {"test":{"a":1,"b":true}}
tests/sample.js:11:1 : Sample-4 Hello World!
tests/sample.js:15:1 : Sample-6 Hello World!
tests/sample.js:28:1 : Sample-11 function to simplify the use. Will indicate this line in the log!
tests/sample.js:30:1 : Sample-12 function c() {
log({verbose: true, ignoreStackLines: 1}, ...arguments);
}
tests/sample.js:32:1 : Sample-13
Error: Test error log!
at Object.<anonymous> (/home/mtzcpd262/Documents/git/log-verbose/tests/sample.js:32:35)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:188:16)
at bootstrap_node.js:609:3
FAQs
Simple log (use console.log) to check if 'verbose' option have been entered
We found that log-verbose 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.