Categories
JavaScript Answers

How to add dates to pm2 error logs with JavaScript?

Spread the love

To add dates to pm2 error logs with JavaScript, we add the --lof-date-format option.

For instance, we run

pm2 start app.js --log-date-format 'DD-MM HH:mm:ss.SSS'

to set the --log-date-format to the date format we want for the log entry date to include the date in each log entry.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *