Fork me on GitHub
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

debugout.js  

debugout.js (debug output) generates a text file from your logs that can be searched, timestamped, downloaded and more. See examples and usage on GitHub.

Install via npm/yarn using the package name  debugout.js.

Download on GitHub

Create a new debugout object and replace "console" with your instance of Debugout. Try it in your console using "bugout" instead of "console".

The following logs (in purple) produce the output (in green) below:

const bugout = new Debugout();
bugout.warn('a warning');
bugout.error('an error');
bugout.log('A date:', d);
bugout.log('An array:', arr);
bugout.log('A function:', testFunc);
bugout.log('A regex', rgx);
bugout.log('an object with nested objects and arrays...', obj);
bugout.log('an array of objects...', arrayWithObjects);

Get the log at run-time or any time with these methods:

Also, search:

And slice:

Also:

Options:

Console window:

// Use a method above and output will be displayed here