PM2 Logrotate Master Guide
Complete Guide to PM2 Log Rotation: Installation, Configuration, and Management
What is pm2-logrotate?
Why Log Rotation Matters
The Problem
The Solution
Installation
Prerequisites
Install pm2-logrotate Module
Configuration Options Explained
Basic Configuration
Configuration Parameters Breakdown
max_size: 1G
max_size: 1Gretain: 2
retain: 2compress: false
compress: falsedateFormat: 'YYYY-MM-DD_HH-mm-ss'
dateFormat: 'YYYY-MM-DD_HH-mm-ss'workerInterval: 30
workerInterval: 30rotateInterval: '0 0 * * *'
rotateInterval: '0 0 * * *'rotateModule: true
rotateModule: true