Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to change pm2-logrotate's strategy #163

Open
jasonperrone opened this issue Sep 1, 2020 · 0 comments
Open

Need to change pm2-logrotate's strategy #163

jasonperrone opened this issue Sep 1, 2020 · 0 comments

Comments

@jasonperrone
Copy link

It seems clear that logrotate's strategy when rolling a log file is to copy the current log to a new file, zero out the current log file and then resume logging on that same file. This strategy is incompatible with tools like Filebeat which are collecting log files. Filebeat tracks the log files it processes through inode. When you roll a log file by copying it to a new file, Filebeat will see all those log records as new. Meanwhile, the current file being zeroed out and restarted would cause Filebeat to miss log records for as long as the file is smaller than Filebeat's last known offset of that file.

Is there a way to change pm2-logrotate's strategy, in exactly the same way you can change this very thing in Unix's logrotate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant