Description
PM2 module to automatically rotate logs of processes managed by PM2.
Install
pm2 install pm2-logrotate
To install a specific version use the @<version>
suffix
pm2 install [email protected]
Configure
max_size
(Defaults to10M
): When a file size becomes higher than this value it will rotate it (its possible that the worker check the file after it actually pass the limit) . You can specify the unit at then end:10G
,10M
,10K
retain
(Defaults to30
file logs): This number is the number of rotated logs that are keep at any one time, it means that if you have retain = 7 you will have at most 7 rotated logs and your current one.compress
(Defaults tofalse
): Enable compression via gzip for