flush logs pm2 code example
Example 1: pm2 logs
pm2 logs <processname>
Example 2: pm2 clear logs
pm2 flush
pm2 flush <api> # Clear the logs for the app with name/id matching <api>
pm2 logs <processname>
pm2 flush
pm2 flush <api> # Clear the logs for the app with name/id matching <api>