I am writing back-end part using Nodejs Express & using mongodb for database so I need to maintain a log for every operation. Which is the best way to do this.
Asked
Active
Viewed 986 times
-1
-
2Possible duplicate of [Node.js Logging](http://stackoverflow.com/questions/12016474/node-js-logging) – Shailendra Sharma Oct 30 '15 at 06:15
-
You can use any logger library like banyan, log4j-node etc... – binariedMe Oct 30 '15 at 06:15
-
You can use Winston logging.. – Subburaj Oct 30 '15 at 06:15
1 Answers
1
Here is the link https://www.npmjs.com/package/winston You can implement it as
var winston = require('winston');
winston.log('info', 'Hello distributed log files!');
winston.info('Hello again distributed logs');
Hope this will help you

Jayant Patil
- 1,537
- 2
- 11
- 18