Skip to content

ptlergo/debug-squasher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codeship Status for ptlergo/debug-squasher

Debug-Squasher

A simple debug tool to display debug messages where needed. Perfect for testing models, and routes.

Install

npm install debug-squasher --save

Usage

Create a log folder in your project with the file lincoln.log. This will be to save all your debug messages.

/log/lincoln.log

Require the 'debug-squasher' package.

const util = require('debug-squasher');

.debug

user can decide what the output message should be. A 2nd parameter is available for data output object. The last parameter is telling which console method to use.

// Takes a title, object , and either log, error or warn
util.debug('title', object, 'log | error | warn')

Run

debug-squasher runs only when the Environmental Variable 'DEBUG' is on.

DEBUG=true node src/util.js

visit my app-store project to see it in action.