console-debug-log
v1.0.2
Published
Prints input to stdout only if running in debug mode.
Downloads
5
Maintainers
Readme
Functionalities
- [x] Log entries only when DEBUG environment variable is set.
- [ ] Customizable environment variable name for debugging.
Instructions to run
Pre-requisites:
- Node.js
- NPM
Directions to install:
- Navigate to your project directory.
- Run
npm i -s console-debug-log
Usage instructions
Usage is very straightforward after installation.
Require in the package
const log = require('console-debug-log');
Log wherever needed
log.debug('Sample Text');
// will print out "Sample Text" to stdout if the DEBUG environment variable is set