I searched but didn't find it, is it possible to change pm2 logs
(specifically pm2.log
file, not apps logs) to log in JSON
format?
Yes, with apps logs its possible via ecosystem file, but about pm2
itself?
No, But you can log pm2 start into a .log format file
pm2 start server.js --output="/path/to/file.log" --error="/path/to/file.log"
# or
pm2 start server.js --log="/path/to/file.log"
Be aware that writing output and error logs to the same file may increase your effort to search for error entries within the log file.
More detailed information about pm2 log