pm2logrotate
pm2logrotate, commonly known as pm2-logrotate, is a PM2 module that provides automatic rotation of log files generated by applications managed by PM2. It helps prevent unbounded growth of stdout and stderr logs by rotating files once they reach a configured size and by limiting the number of archived logs kept on disk.
Installation and usage: The module is installed through the PM2 CLI with pm2 install pm2-logrotate. After installation,
Configuration options include max_size (maximum size of a log file before rotation), retain (number of rotated
Operation: When a log file exceeds the configured size, it is rotated and the old file is
Limitations and considerations: pm2-logrotate only manages PM2 logs; it does not rotate application logs created by
See also: PM2 logging features, log rotation concepts, other PM2 modules.