npm.io
1.0.2 • Published 6 years ago

console-debug-log

Licence
MIT
Version
1.0.2
Deps
0
Size
3 kB
Vulns
0
Weekly
0

Debug logger

Node.js tooling to log only in debugging environments


Functionalities

  • 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

Contributors



Made with by DSC VIT

Keywords