pm2-logrotate icon indicating copy to clipboard operation
pm2-logrotate copied to clipboard

Log Rotate

Open jonhardman opened this issue 7 years ago • 2 comments

Hi,

The log rotate settings that I am currently using are causing the logs to rotate every minute, from the settings I was expecting the logs to rotate at midnight only, or if the log size is > 10mb. I have also set log retain to 1, but all logs seem to be kept. I am using the latest version of pm2-logrotate.

These are the current settings I have been using: workerInterval = 60 retain = 1 compress = false max_size = 10MB rotateInterval = 0 0 * * * rotateModule = true

Thanks for any help in advance!

jonhardman avatar Jan 23 '18 16:01 jonhardman

The max_size option has to be 10M not 10MB.

10MB will be interpreted as 10 byte

danez avatar Feb 23 '18 10:02 danez

I have max_size set at 10M while rotateInterval set at 0 0 * * *

How can I force the logs to rotate at 12midnight rather than depending on the file size?

AnneMedina avatar Sep 06 '18 07:09 AnneMedina