Example displaying morgan and winston logger. Creates log files in two formats:
- one displaying recent logs.
- other maintaining date wise logs.
Requires Node.js v4+ to run.
Install the dependencies and start the server.
$ cd morgan-winston-example
$ npm install
$ node index.js
Following are the dependencies:
- Morgan - HTTP request logger middleware for node.js
- Winston - A logger for just about everything.
- Express - Fast, unopinionated, minimalist web framework for node.
- winston-daily-rotate-file - A transport for winston which logs to a rotating file.