* Output the debug/trace log, only if the respective --trace flag is enabled * * @param {String|Function} log to output * @param {Error} errObj to stack trace, if provided
(log, errObj)
| 317 | * @param {Error} errObj to stack trace, if provided |
| 318 | */ |
| 319 | debug(log, errObj) { |
| 320 | // Does nothing if trace is not enabled |
| 321 | // or if stdOutput is not enabled |
| 322 | if(!this.trace || !this.stdOutput) { |
| 323 | return; |
| 324 | } |
| 325 | |
| 326 | // Normalize the input first |
| 327 | log = normalizeString(log); |
| 328 | |
| 329 | // Handle stdOutput - if enabled |
| 330 | console.log( chalk.dim(log) ); |
| 331 | if( errObj ) { |
| 332 | console.log(errObj); |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | /** |
| 337 | * Output the debug/trace log, only if the respective --trace flag is enabled |
nothing calls this directly
no test coverage detected