After force running logrotate, my app keeps writing to my_app.log.1 (the old log that should be archived later) instead of my_app.log.
This make my_app.log an empty file, therefore logrotate runs without any effect. And my_app.log.1 keep growing to gigabytes.
I am running Ubuntu 12.04. My app is a Node.js app using pm2. Following is my logrotate configuration:
"/var/log/my_app/*.log" {
daily
size 50M
rotate 10
missingok
compress
delaycompress
notifempty
}
I know I put notifempty there, but why is my_app.log.1 written to in the first place?