console-debug-log

1.0.2 • Public • Published

Debug logger

Node.js tooling to log only in debugging environments


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

Contributors



Made with ❤️ by DSC VIT

Package Sidebar

Install

npm i console-debug-log

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

2.77 kB

Total Files

5

Last publish

Collaborators

  • pragati1610