- [x] Log entries only when DEBUG environment variable is set.
- [ ] Customizable environment variable name for debugging.
-
Pre-requisites:
- Node.js
- NPM
-
Directions to install:
- Navigate to your project directory.
- Run
npm i -s console-debug-log
Usage is very straightforward after installation.
const log = require('console-debug-log');
log.debug('Sample Text');
// will print out "Sample Text" to stdout if the DEBUG environment variable is set
Made with ❤️ by DSC VIT