1.2.0 • Published 5 years ago
debug-my-logger v1.2.0
My Logger
A light and simple TypeScript logging library that enables console.log() only by either a query string o a local storage flag
Installation
npm i debug-my-logger --save
Enabling logging by querystring
Add 'myDebug' to your url querystring
e.g. 1: http://localhost?myDebug
e.g. 2: http://localhost?myDebug=123
Enabling logging by localStorage
Add 'myDebug' key to the localstorage object
localStorage.setItem("myDebug",1)
TypeScript
import { DebugLogger } from 'debug-my-logger';
DebugLogger.log("Logging test 1");
DebugLogger.log('%s, %s', var1, var2);
DebugLogger.log(`Logging test 3: ${this.properties.value1}`);