⊗ndHsPMSLg 39 of 47 menu

Project Logs via PM2 on a VPS Server

Scripts launched via PM2 do not output console.log to the server console. Also, such scripts do not output occurred errors. However, PM2 allows you to configure the output of all this to files.

This is how we will make the results of console.log execution output to a file:

pm2 start app.js -o output.txt --time

And this is how we will make occurred errors output to a file:

pm2 start app.js -e error.txt --time

And this is how we will output both:

pm2 start app.js -o output.txt -e error.txt --time

Launch your test script with output of messages and errors to files.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline