v-log
A simple javascript logging utility.
Installation
npm install v-log
General Usage
let vlog = ; vlog; // [Sun Feb 05 2017 15:24:38][ERROR] Invalid request vlog; // [Sun Feb 06 2017 13:24:28][WARNING] Session timed out vlog; // prints nothing as default log level is warning vlog; // prints nothing as default log level is warning vlog; // prints nothing as default log level is warning
Log Level
There are 5 different log levels namely error, warning, info, verbose, debug where error being least logging level and debug being highest level.
Default log level is warning which means any log message above warning i.e info, verbose or debug will be ignored.
You can change the log level as below:
vlog; vlog; // [Sun Feb 05 2017 15:24:38][ERROR] Invalid request vlog; // [Sun Feb 06 2017 13:24:28][WARNING] Session timed out vlog; // [Sun Feb 07 2017 11:24:28][INFO] Starting up the app vlog; // [Sun Feb 07 2017 11:24:28][VERBOSE] Successfully logged in vlog; // [Sun Feb 07 2017 11:24:28][DEBUG] Navigating to checkout