debug
factory
Simple Providing a simple, composable, chainable debug utilities based on the tj's wonderful debug
module
Installation
npm install --save create-debugger
Usage
;const logger = ;logger; // Debug with key `myapp:warn` - 'hey'
Chaining keys
; const logger = ;const subLogger = ; logger; // Debug with key `myapp:warn` - 'hey'subLogger; // Debug with key `myapp:sublogger:warn` - 'ho'
Composing
;const logger = ; // then somewhere in your code.. const myVar = logger; // Debugs 'some text' and returns 'some text'. // if you use ramda/lodash compose: const something = ; // and the log is a part of your function.
Subdebuggers
info
debug
warn
error