pm2-logrotate
pm2-logrotate copied to clipboard
Log Rotate
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!
The max_size
option has to be 10M
not 10MB
.
10MB
will be interpreted as 10 byte
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?