Captures console and restores it at a later moment.
I walked into a situation where I have to validate the existence of a log file stored in a system variable before I can fire up a proper logger. If either the system variable or the log file will not exist I have to abort the process. If not, I have to write the location of the log file to the logs.
$ npm install --save console-capture
If you'd like to try the examples, please link the module first by running
// ./examples/capture/index.js'use strict';var consoleCapture = ;consoleCapture;console;console;console;consoledirpizza: 'yummy';console;consoleCapture;
$ gulp test
Test reports are written to
- Do pull requests.
- Make sure there's tests and meaningful coverage.
- Issues should go in issues.