pm2-logrotate rotates standard error but not standard output. This is the content of ~/.pm2/module_conf.json
{
"pm2-logrotate": {
"max_size": "10M",
"retain": "30",
"compress": false,
"dateFormat": "YYYY-MM-DD_HH-mm-ss",
"workerInterval": "30",
"rotateInterval": "0 0 * * *",
"rotateModule": true
},
"module-db-v2": {
"pm2-logrotate": {}
}
}
Actually, looking into pm2-logrotate-out.log, it does rotate the log but it deletes it immediately:
"/home/app/.pm2/logs/app-out__2019-05-09_11-20-05.log" has been created
"app-out__2019-05-09_11-20-05.log" has been deleted
Note: there are no rotated files:
$ ls -lrt app-out__*
ls: cannot access 'app-out__*': No such file or directory
pm2 version is 3.2.2