log-verbose
Simple log (use console.log) to check if 'verbose' option have been entered
tests/sample.js
const log = ; const text = 'Hello World!'; log; // Always Show ; // log only if verbose = true ; // log object ; // filter by sample.js ou class strings ; // filter string string DON'T support masking character ; // sample with regex (search all js files to log) ; // no log ; // no log ; // no log ; // no 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