lazy-logger
a simple wrapper for winston and winston-daily-rotate-file that i use as a logger for fast prototyping. Ideal for lazy people. This module is just a lazy way to switch from the default console to winston while adding simple daily log files.
If you need a proper module to handle your logging, head over to winston
Installation
npm install lazy-logger
Usage
The LazyLogger constructor accepts 4 arguments
- The Winston Logging level as indicated by winston check the module's documentation for more.
NOTE
1. can be'silly'
,'debug'
,'verbose'
,'info'
,'warn'
,'error'
- Boolean that dictates the creation of a daily rotating file
- In case
2.
is true a path will be required to store the log files - the date format of the date that will be part of the logfile name
var LazyLogger= 'lazy-logger';//initialize a logger object with info level of debug, a path, and a pattern for datevar logger= 'silly'true'./log-''yyyy-MM-dd';logger;logger;logger;logger;logger;logger;