Sunday, 8 April 2018

Logging with Express and pm2

Hello,i have built an express application and use the logging frameworks morgan and winston. In production should the application run with pm2 and behind a reverse proxy.I have got a few unanswered questions and hope you can answer them.Is pm2 a good Process Manager for applications in an production environment?How should I use logging? I know that pm2 writes stderr and stdtout in files. Now morgan and winston create their own files, so I got multiple file locations. The files from morgan and winston and in another directory pm2 logs.Can I redirect logging of morgan and winston to pm2? Because of logrotation and i don't want to have multiple file locations for an application.Are there best practices for logging in an express application with morgan, winston and pm2 in an production environment?I hope you can answer my questions.Thanks for your help and have a nice day.

Submitted April 08, 2018 at 05:52PM by xQuai

No comments:

Post a Comment