clear logs of pm2 procces by id code example
Example: pm2 clear logs
pm2 flush
pm2 flush <api> # Clear the logs for the app with name/id matching <api>
pm2 flush
pm2 flush <api> # Clear the logs for the app with name/id matching <api>