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

Feature: Can we add an action of rotating logs on demand #164

Open
gaurav-cointab opened this issue Sep 26, 2020 · 1 comment
Open

Feature: Can we add an action of rotating logs on demand #164

gaurav-cointab opened this issue Sep 26, 2020 · 1 comment

Comments

@gaurav-cointab
Copy link

Hi,

Can we have an option of rotating logs on demand. For example can we have an option from command line where when we execute it, it can rotate logs for all the apps, or for targeted apps via pm2 command line.

For example (something of this sort)
pm2 rotate logs [1,all,"app name"]

@eagleyes
Copy link

I agree that we need a trigger to manually force a logrotation like linux logrotate command.

Right now I would like the application to rotate the logs each time it is restarted so that when we look at logs they are fresh from latest restart. This is not possible with this plugin and forces me to look for another way and will not use pm2-logrotate... will probably stick with system logrotate function since it has that capability.

let me know if it is possible to implement .

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

2 participants