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

RETAIN ignored on Windows platforms #56

Open
jgoehringer opened this issue May 9, 2017 · 6 comments
Open

RETAIN ignored on Windows platforms #56

jgoehringer opened this issue May 9, 2017 · 6 comments

Comments

@jgoehringer
Copy link

The determination of the variable fileBaseName (line 65) depends on forward slash being the path separator. Tested using path.sep instead of '/'; yields expected results.

@maxime-helen-sb
Copy link

maxime-helen-sb commented Dec 13, 2017

Same for me. Would it be possible to have this fix to master? I don't know how to ask pm2 to use my own fork of log rotate as a plugin. I tried to create a PR but I have no permissions as expected.

@NitayRabi
Copy link

Same Here. - logs are never deleted, seems to retain an infinite amount of files over time.

@cuteboi
Copy link

cuteboi commented Mar 14, 2018

Same here, on FreeBSD, but I'm getting an error as well. I'll create a new report for that.

jwangnz pushed a commit to jwangnz/pm2-logrotate that referenced this issue Sep 12, 2018
@NoorAbdulhameed
Copy link

This issue is produced on "[email protected]", in app.js file the "path.sep" is not used; instated the code still uses the forward slash '/' which does not work on Windows

** I used "pm2 install pm2-logrotate" to install the module on PM2 and the "retain" config did not work, log files just kept piling beyond the value of "retain", when I checked the app.js file under pm2-logrotate, the file still uses the '/' separator, the below code snippet taken from the app.js file:

var fileBaseName = file.substr(0, file.length - 4).split(**'/'**).pop() + "__";

hence the fix in #111 does not apply to version @2.7.0

is the pull request #154 planned to be merged to version 2.7.0 any time soon as it should fix the issue?

@Karrlllis
Copy link

Hi

Is there plan to merge in fix?

@mycharoka
Copy link

does the log keep on piling up even with retain being set?

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

7 participants