A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
Flushing pm2 logs
-
Automatically log rotate all applications logs managed by PM2
https://github.com/pm2-hive/pm2-logrotate -
Yes that’s another option, however personally I don’t use log rotates for a variety of reasons. In this case specifically, others have mentioned problems with it on the PM2 site.
-
I just want to add, that using
pm2 flush
in a script (for restart purposes) may not work as expected. The next operation will start immediately, before flush completes, and thus the new thread will already start writing to the file, blocking it from getting cleared.You need to wait for the entire thread to finish, like this:
pm2 flush; pm2 start mm; echo "this doesn't clear the logs"; pm2 flush && pm2 start mm; echo "now it works";
-
This post is deleted! -
This post is deleted!