Motivation
We are lazy! Let make it as easy as possible to config.
Installation
npm install --save enhance-console-log
Setup
Just import and call on your entry point
const enhanceConsoleLog =
Configurationn
// Default configuration
Simple Usage
Just call following console log function, debug, log, info, warn and error
consoleconsoleconsoleconsoleconsole
You will get following log with color if your terminal support
2019-03-09 00:57:48741 DEBUG --- This is console2019-03-09 00:57:48741 LOG --- This is console2019-03-09 00:57:48741 INFO --- This is console2019-03-09 00:57:48741 WARN --- This is console2019-03-09 00:57:48741 ERROR --- This is console
Helper Logging Function
We provide some logging helper patch directly to console object
consoleconsoleconsoleconsoleconsole
Example
const orderInfoLog = consoleconst orderLog = console
You will get following log
2019-03-09 00:57:48742 INFO --- order:111111 created2019-03-09 00:57:48742 LOG --- order:111111 trying to update2019-03-09 00:57:48742 INFO --- order:111111 updated