* Output the debug/trace log, only if the respective --trace flag is enabled * * @param {String|Function} log to output, inside a "---" line block * @param {Error} errObj to stack trace, if provided
(log, errObj)
| 340 | * @param {Error} errObj to stack trace, if provided |
| 341 | */ |
| 342 | debugBlock(log, errObj) { |
| 343 | // Does nothing if trace is not enabled |
| 344 | if(!this.trace || !this.stdOutput) { |
| 345 | return; |
| 346 | } |
| 347 | |
| 348 | // Normalize the input first |
| 349 | log = normalizeString(log); |
| 350 | |
| 351 | // Handle stdOutput - if enabled |
| 352 | console.log( chalk.dim("--------------------------------------------------") ); |
| 353 | console.log( chalk.dim(log) ); |
| 354 | if( errObj ) { |
| 355 | console.log(errObj); |
| 356 | } |
| 357 | console.log( chalk.dim("--------------------------------------------------") ); |
| 358 | } |
| 359 | |
| 360 | //-------------- |
| 361 | // Standard output |
nothing calls this directly
no test coverage detected