Custom console which can be turned on or off
- Prevents errors on console methods when no console present
- Exposes a global log function that preserves line numbering and formatting
Console.log:
debug.log('log');
Console.error:
debug.error('error');
Turn on the log:
debugOn();
Turn off the log:
debugOff();
Please check example
folder.