pm2 console output code example
Example 1: pm2 logs
pm2 logs <processname>
Example 2: pm2 group console messages
module.exports = {
apps : [{
name : "app1",
script : "./app.js",
error_file : "./err.log",
out_file : "./out.log"
}]
}