pm2-logrotate always using default setting max_size
nguyenngoc2505 opened this issue · comments
Ngoc Nguyen commented
I've set config for pm2 log like: pm2 set pm2-logrotate:max_size 5G
and expect that log will be rotated (flushed) every time log file reaches 5G but in fact it always rotate when the log file reaches 10M (by default settings) and it didn't compress too
This is my config
Module: pm2-logrotate
$ pm2 set pm2-logrotate:max_size 5G
$ pm2 set pm2-logrotate:retain 30
$ pm2 set pm2-logrotate:compress true
$ pm2 set pm2-logrotate:dateFormat YYYY-MM-DD_HH-mm-ss
$ pm2 set pm2-logrotate:workerInterval 30
$ pm2 set pm2-logrotate:rotateInterval 0 0 * * *
$ pm2 set pm2-logrotate:rotateModule false
Always rotate when log file reached 10M zzz
ll logs/
-rw-rw-r-- 1 user user 10891103 Nov 14 05:55 app-out__2023-11-14_05-55-55.log
-rw-rw-r-- 1 user user 10787718 Nov 14 06:04 app-out__2023-11-14_06-04-25.log
-rw-rw-r-- 1 user user 10970668 Nov 14 06:13 app-out__2023-11-14_06-13-25.log
-rw-rw-r-- 1 user user 10531002 Nov 14 06:22 app-out__2023-11-14_06-22-55.log
-rw-rw-r-- 1 user user 10711930 Nov 14 06:32 app-out__2023-11-14_06-32-25.log
-rw-rw-r-- 1 user user 10811828 Nov 14 06:40 app-out__2023-11-14_06-40-25.log
-rw-rw-r-- 1 user user 10628306 Nov 14 06:49 app-out__2023-11-14_06-49-25.log
-rw-rw-r-- 1 user user 10964841 Nov 14 07:01 app-out__2023-11-14_07-01-25.log
-rw-rw-r-- 1 user user 10671582 Nov 14 07:13 app-out__2023-11-14_07-13-25.log